test(bigquery): add ITBigQueryTest integration tests for queryArrow - #14403
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds integration tests to verify query results in Arrow format. Specifically, it introduces testQueryResultsFormatArrow and testQueryResultsFormatArrowMultiPage in ITBigQueryTest.java to validate both single-page and multi-page query results using ArrowQueryResult and VectorSchemaRoot. I have no feedback to provide as there are no review comments.
41b71e7 to
91e6ea9
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces integration tests to verify BigQuery queries using the Arrow results format, specifically testing single-page and multi-page results. The review feedback suggests strengthening the assertions in the single-page test by validating the schema and actual values within the VectorSchemaRoot, rather than only checking the row count.
| for (VectorSchemaRoot root : result) { | ||
| batchCount++; | ||
| totalRows += root.getRowCount(); | ||
| assertEquals(1, root.getRowCount()); | ||
| } |
There was a problem hiding this comment.
To ensure the integrity of the data returned via the Arrow format, consider validating the schema and the actual values within the VectorSchemaRoot. Currently, the test only validates the row count, which could pass even if the data itself is corrupted or incorrectly mapped.
for (VectorSchemaRoot root : result) {
batchCount++;
totalRows += root.getRowCount();
assertEquals(1, root.getRowCount());
assertNotNull(root.getSchema().findField("id"));
assertNotNull(root.getSchema().findField("name"));
assertNotNull(root.getSchema().findField("ts"));
assertEquals(1L, root.getVector("id").getObject(0));
assertEquals("hello", root.getVector("name").getObject(0).toString());
}
This PR adds integration tests verifying the
queryArrowclient API against the live BigQuery service.It tests single-page and multi-page Arrow stream consumption, validating row counts and VectorSchemaRoot iteration over live queries.