Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: flight sql cleanup #32

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/flight-sql-client/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
#[derive(Debug, Snafu)]
#[snafu(visibility(pub(crate)))]
pub enum Error {
#[snafu(display("column '{name}' is missing"))]
MissingColumn { name: String },
#[snafu(display("{message}"))]
#[snafu(display("{message}: {source:?}"))]
Arrow {
source: ArrowError,
message: &'static str,
},
#[snafu(display("{message}: {source:?}"))]
Flight {
source: FlightError,
message: &'static str,
},
#[snafu(display("{message}: {source}"))]
Status {
source: Status,
message: &'static str,
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/c1-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"apache-arrow": "18.0.0",
"@jest/environment": "^29.7.0",
"@types/cross-spawn": "^6.0.0",
"cross-spawn": "^7.0.5",
"cross-spawn": "^7.0.6",
"modern-spawn": "^1.0.0"
},
"devDependencies": {},
Expand Down
9 changes: 5 additions & 4 deletions tests/c1-integration/test/flight.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('flight sql', () => {

test('makes query', async () => {
const client = await getClient()
const buffer = await client.query('SELECT * FROM conclusion_feed')
const buffer = await client.query('SELECT * FROM conclusion_events')
const data = tableFromIPC(buffer)
console.log(JSON.stringify(data))
})
Expand Down Expand Up @@ -68,11 +68,12 @@ describe('flight sql', () => {
// disabled until server support is implemented
test.skip('prepared stmt', async () => {
const client = await createFlightSqlClient(OPTIONS)
const data = await client.preparedStatement(
'SELECT * from conclusion_feed where stream_type = $1',
const buffer = await client.preparedStatement(
'SELECT * from conclusion_events where stream_type = $1',
new Array(['$1', '3']),
)
console.log(data)
const data = tableFromIPC(buffer)
console.log(JSON.stringify(data))
})

afterAll(async () => {
Expand Down