feat(bigquery): add QueryResultsFormat and ArrowSerializationOptions configurations - #13942
feat(bigquery): add QueryResultsFormat and ArrowSerializationOptions configurations#13942jinseopkim0 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for Apache Arrow serialization options in BigQuery queries by adding the ArrowSerializationOptions class, the QueryResultsFormat enum, and integrating them into QueryJobConfiguration. However, the new options are currently not mapped in QueryJobConfiguration.toPb() and QueryJobConfiguration.fromPb(), which will cause them to be silently dropped during serialization. It is recommended to implement these mappings to ensure the feature functions correctly.
| // Test toPb/fromPb (not preserved) | ||
| QueryJobConfiguration jobFromPb = QueryJobConfiguration.fromPb(job.toPb()); | ||
| assertNull(jobFromPb.getQueryResultsFormat()); | ||
| assertNull(jobFromPb.getArrowSerializationOptions()); |
There was a problem hiding this comment.
The new configuration options queryResultsFormat and arrowSerializationOptions are currently not mapped in QueryJobConfiguration.toPb() and QueryJobConfiguration.fromPb(). As a result, these options will be silently dropped when the configuration is serialized and sent to the BigQuery service, making the feature non-functional. Please implement the mapping in QueryJobConfiguration and update this test to assert that the fields are correctly preserved during the toPb/fromPb roundtrip.
| // Test toPb/fromPb (not preserved) | |
| QueryJobConfiguration jobFromPb = QueryJobConfiguration.fromPb(job.toPb()); | |
| assertNull(jobFromPb.getQueryResultsFormat()); | |
| assertNull(jobFromPb.getArrowSerializationOptions()); | |
| // Test toPb/fromPb (preserved) | |
| QueryJobConfiguration jobFromPb = QueryJobConfiguration.fromPb(job.toPb()); | |
| assertEquals(format, jobFromPb.getQueryResultsFormat()); | |
| assertEquals(options, jobFromPb.getArrowSerializationOptions()); |
Stacked PR 1 of 3: Exposes the public configuration API surface (QueryResultsFormat and ArrowSerializationOptions) and binds them to QueryJobConfiguration.