Skip to content

fix(bigquery-jdbc): prepare Arrow result set for job-stream data - #14941

Open
keshavdandeva wants to merge 2 commits into
jdbc/arrow-support-featurefrom
fix/jdbc-arrow-resultset-hardening
Open

keshavdandeva wants to merge 2 commits into
jdbc/arrow-support-featurefrom
fix/jdbc-arrow-resultset-hardening

Conversation

@keshavdandeva

@keshavdandeva keshavdandeva commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

b/582676539

Prepares the Arrow reader for the job stream (b/581544197).

  • Producer skips Read API responses without rows, fails fast when a response reports rows but has no record batch, and forwards a schema sent in the stream.
  • Result set skips zero-row batches and builds its decoder from the first schema it sees.
  • isBeforeFirst()/isLast() return false for an empty result.

@keshavdandeva
keshavdandeva requested review from a team as code owners November 6, 2026 16:28

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the BigQuery JDBC driver's Arrow result set processing to support streams with an unknown total row count, skip empty batches, and dynamically forward schemas. It also optimizes memory usage during Arrow batch deserialization by reading directly from the ByteString input stream instead of copying it to a heap byte array. Feedback is provided to wrap the newly introduced InputStream and ReadableByteChannel in a try-with-resources block to prevent potential static analysis warnings regarding unclosed resources.

@keshavdandeva keshavdandeva changed the title fix(bigquery-jdbc): harden Arrow result set for empty batches, unknown row counts and lazy schema fix(bigquery-jdbc): prepare Arrow result set for job-stream data Nov 9, 2026
@keshavdandeva
keshavdandeva force-pushed the fix/jdbc-arrow-resultset-hardening branch from bb275f7 to de89218 Compare November 13, 2026 15:40

This branch has not been deployed

No deployments
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.

2 participants