Skip to content

feat(bigquery-jdbc): optimize memory footprint for JSON result set streaming#13660

Open
Neenu1995 wants to merge 9 commits into
mainfrom
faster-json-path
Open

feat(bigquery-jdbc): optimize memory footprint for JSON result set streaming#13660
Neenu1995 wants to merge 9 commits into
mainfrom
faster-json-path

Conversation

@Neenu1995

@Neenu1995 Neenu1995 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

b/529436374

  • Centralizes row-unpacking logic into BigQueryFieldValueListWrapper using a static, stateless utility pattern to reduce object allocations during JSON result set parsing.
  • Pre-computes complex column flags (ARRAY, STRUCT, RANGE) outside the page-fetching loop in BigQueryStatement to avoid redundant per-row inspection.
  • Preserves raw FieldValue references for complex types (RANGE, ARRAY, STRUCT) during row unpacking to prevent improper string coercion.

@Neenu1995 Neenu1995 requested review from a team as code owners July 6, 2026 17:31

@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 introduces BigQueryJsonStreamParser to parse BigQuery REST JSON responses into lightweight Object[] row buffers, reducing JVM heap overhead and GC pause times. It also updates BigQueryFieldValueListWrapper and BigQueryStatement to support and utilize these lightweight row buffers. The review feedback highlights critical infinite loop vulnerabilities in the JSON parsing loops when handling truncated or abruptly ended streams, and suggests using standard Jackson parsing patterns with explicit null token checks. Additionally, the reviewer recommends chaining constructors to reduce code duplication and removing unused stream parsing methods from the production code.

@Neenu1995 Neenu1995 changed the title feat(bigquery-jdbc): optimize Standard API performance with streaming row parser feat(bigquery-jdbc): optimize memory footprint for JSON result set streaming Jul 7, 2026
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