Repository navigation
feat(bigquery-jdbc): read large results from the job stream - #15078
Open
keshavdandeva wants to merge 2 commits into
Open
keshavdandeva wants to merge 2 commits into
keshavdandeva wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request enables reading query results directly from a query job's stream when EnableQueryResultsArrowFormat is enabled and no destination table is set, bypassing the need for a read session. It refactors BigQueryStatement to support this flow, including extracting helper methods for result set creation and exception handling, and adds comprehensive unit and integration tests. The reviewer suggests improving the extracted arrowResultSetException method by returning the exception directly if it is already an instance of BigQueryJdbcException, thereby avoiding redundant wrapping and preserving original exception properties.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
b/582676785
With
EnableQueryResultsArrowFormat=true, a large SELECT result is read as Arrow from the query job's_defaultstream, using the reader from #15048. With the property off, nothing changes.Changes
BigQueryStatement.processQueryResponsegets one new branch. It coversjobs.query, long-running jobs and each child job of a script.useJobStream(TableResult)holds the rule. A result is streamed from row 0 when noLargeResultTableorLargeResultDatasetis set, it has a next page, and it returns at leastHighThroughputMinTableSizerows (default 10,000), counted aftersetMaxRows. Any other result is read as JSON. With a destination table set, today's High-Throughput API rules apply.cancel()could set it to null.EnableQueryResultsArrowFormatandEnableHighThroughputAPIsay how the two combine.Not in this PR
SQLException.maxRowsis reached (b/586660667).Decisions to check
HighThroughputMinTableSize, not a new property.MaxResults.disable_tpc.