chore(bigquery): add Arrow performance benchmarks to QueryBenchmark - #14416
jinseopkim0 wants to merge 3 commits into
Conversation
|
@gemini-code-assist review |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
@gemini-code-assist review |
There was a problem hiding this comment.
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.
2faeb26 to
34d4ffc
Compare
34d4ffc to
31a9900
Compare
31a9900 to
f5f08ba
Compare
| 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) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Thanks for the feedback. I've added simple paths as suggested.
There was a problem hiding this comment.
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
f5f08ba to
7b36fb1
Compare
74615d3 to
5af88f8
Compare
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.