Skip to content

fix: handle ARROW_STREAM attachment in type generator#271

Open
jamesbroadhead wants to merge 1 commit intodatabricks:mainfrom
jamesbroadhead:fix/type-generator-arrow-stream
Open

fix: handle ARROW_STREAM attachment in type generator#271
jamesbroadhead wants to merge 1 commit intodatabricks:mainfrom
jamesbroadhead:fix/type-generator-arrow-stream

Conversation

@jamesbroadhead
Copy link
Copy Markdown
Contributor

Summary

  • When serverless warehouses return ARROW_STREAM format, DESCRIBE QUERY results come as an inline base64 Arrow IPC attachment rather than data_array. This caused convertToQueryType to generate empty types {}.
  • Added a fallback in convertToQueryType that decodes the Arrow IPC attachment schema to extract column names and types when data_array is empty.
  • Extended DatabricksStatementExecutionResponse type with the optional attachment field.

Test plan

  • Verify type generation against a serverless warehouse that returns ARROW_STREAM format
  • Verify existing JSON_ARRAY warehouses still produce correct types (no regression)
  • Run pnpm typecheck and pnpm test to confirm no build or test regressions

This pull request was AI-assisted by Isaac.

When serverless warehouses return ARROW_STREAM format, the DESCRIBE QUERY
result comes as an inline base64 Arrow IPC attachment rather than data_array.
This caused convertToQueryType to generate empty types {}.

Add a fallback that decodes the Arrow IPC attachment schema to extract column
names and types when data_array is empty.

Co-authored-by: Isaac
Signed-off-by: James Broadhead <jamesbroadhead@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant