Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a separate buffer size configuration for Arrow results in BigQueryStatement, replacing the use of getBufferSize() with a new getArrowBufferSize() method initialized to a default capacity of 32. A corresponding unit test was added to verify the bounded queue capacity. The feedback suggests changing the visibility of getArrowBufferSize() to private to improve encapsulation, as it is only used internally.
Comment on lines
+1516
to
+1518
| int getArrowBufferSize() { | ||
| return DEFAULT_ARROW_BUFFER_SIZE; | ||
| } |
Contributor
There was a problem hiding this comment.
The getArrowBufferSize() method is only used internally within the BigQueryStatement class. To adhere to encapsulation principles and minimize the class's API surface, its visibility should be restricted to private.
Suggested change
| int getArrowBufferSize() { | |
| return DEFAULT_ARROW_BUFFER_SIZE; | |
| } | |
| private int getArrowBufferSize() { | |
| return DEFAULT_ARROW_BUFFER_SIZE; | |
| } |
logachev
enabled auto-merge (squash)
October 21, 2026 03:44
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.
We were using the same buffer size constant for Arrow and Json data retrieval. The problem was that while for JSON buffer represented rows, for Arrow it represented batches.
As a result, when using ReadAPI we allowed 20k batches which will be causing OOM or memory pressure issues when consumption is slower than fetching.
b/575989190