Skip to content

chore(bigquery): add Arrow performance benchmarks to QueryBenchmark - #14416

Open
jinseopkim0 wants to merge 3 commits into
mainfrom
feat-bigquery-arrow-benchmark
Open

jinseopkim0 wants to merge 3 commits into
mainfrom
feat-bigquery-arrow-benchmark

Conversation

@jinseopkim0

Copy link
Copy Markdown
Contributor

Add performance benchmarks for row-based (queryWithArrowRowBased) and zero-copy (queryWithArrowZeroCopy) Arrow query execution paths in QueryBenchmark, fulfilling the design document testing and benchmarking strategy.

@jinseopkim0

Copy link
Copy Markdown
Contributor Author

@gemini-code-assist review

@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 adds two new benchmark methods, queryWithArrowRowBased and queryWithArrowZeroCopy, to QueryBenchmark.java to measure Arrow-based query performance. The reviewer recommends explicitly setting the query results format to ARROW in the zero-copy benchmark to ensure a fair and consistent comparison with the row-based benchmark.

@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 two new benchmark methods, queryWithArrowRowBased and queryWithArrowZeroCopy, to QueryBenchmark.java for measuring BigQuery query performance with Arrow format. Feedback on the changes suggests explicitly setting the query results format to ARROW in the queryWithArrowZeroCopy configuration to ensure the query is executed in the correct format.

@jinseopkim0

Copy link
Copy Markdown
Contributor Author

@gemini-code-assist review

@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 two new benchmark methods, queryWithArrowRowBased and queryWithArrowZeroCopy, to QueryBenchmark.java to evaluate the performance of querying with the Arrow format using row-based and zero-copy mechanisms. There are no review comments, and I have no feedback to provide.

@jinseopkim0
jinseopkim0 added this pull request to stack #14406 September 18, 2026 00:58
@jinseopkim0
jinseopkim0 force-pushed the feat-bigquery-arrow-benchmark branch from 2faeb26 to 34d4ffc Compare September 18, 2026 01:14
@jinseopkim0
jinseopkim0 requested a review from lqiu96 September 18, 2026 01:14
@jinseopkim0
jinseopkim0 marked this pull request as ready for review September 18, 2026 01:15
@jinseopkim0
jinseopkim0 requested review from a team as code owners September 18, 2026 01:15
@jinseopkim0
jinseopkim0 force-pushed the feat-bigquery-arrow-benchmark branch from 34d4ffc to 31a9900 Compare September 18, 2026 14:52
@jinseopkim0
jinseopkim0 force-pushed the feat-bigquery-arrow-benchmark branch from 31a9900 to f5f08ba Compare September 18, 2026 21:04
Comment on lines +99 to +113
public void queryWithArrowRowBased(QueryParams queryParams, Blackhole blackhole)
throws Exception {
QueryJobConfiguration config =
QueryJobConfiguration.newBuilder(queryParams.queries)
.setUseLegacySql(false)
.setQueryResultsFormat(QueryResultsFormat.ARROW)
.build();
TableResult result = bigquery.query(config);
for (FieldValueList row : result.iterateAll()) {
blackhole.consume(row);
}
}

@Benchmark
public void queryWithArrowZeroCopy(QueryParams queryParams, Blackhole blackhole)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IIUC, both of these should trigger the job path. I think it would also be nice to have a simple path as well (e.g. handles just first batch)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback. I've added simple paths as suggested.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Actually I might be a bit confused on this. How do the two benchmark differ?

I was thinking that
One set should have queries that should be returned in a single batch
Anther set should have queries that require multiple batches

Both sets should test again arrow and non-arrow

@jinseopkim0
jinseopkim0 force-pushed the feat-bigquery-arrow-benchmark branch from f5f08ba to 7b36fb1 Compare September 18, 2026 21:58
@jinseopkim0
jinseopkim0 requested a review from lqiu96 September 18, 2026 22:03
Base automatically changed from feat-bigquery-arrow-query-it to main September 18, 2026 22:17
@jinseopkim0
jinseopkim0 force-pushed the feat-bigquery-arrow-benchmark branch from 74615d3 to 5af88f8 Compare September 18, 2026 22:17
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