Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(go/adbc/driver/bigquery): Implement GetObjects and get tests pas…
…sing (apache#2044) A bunch of stuff I've been working on with the bigquery driver as well as improvements to the shared machinery for implementing drivers (mostly `GetObjects` here). There's still more work to do on each of these paths, but it's probably a good idea to get this chunk merged. ### Primary Changes - Add steps CI workflows to authenticate with GCP and run BQ ADBC driver tests - Currently skip because auth fails, should start to run/succeed when valid `GCP_WORKLOAD_IDENTITY_PROVIDER` is added to runner environment. - Update `DbObjectsEnumerator` interface to simplify implementation of `GetObjects` for new drivers. - Implement `DbObjectsEnumerator` for bigquery driver. - Split out bigquery `QueryConfig` (data-only) from `Query` (stateful) to better decouple `Connection` and `Statement` state. - Simplify bigquery client authentication to rely on environment for standard auth conventions. - Cleanup/expand bigquery driver tests. - Improve coverage of various `GetObjects` scenarios in driver tests. - Rewrite Snowflake `GetObjects` implementation using mix of custom approach + new common driverbase machinery. ### Reason for Snowflake Changes After expanding the cases in the `GetObjects` test suite, there were several that Snowflake was failing on. The logic was getting fairly complicated with the existing approach and I wanted to leverage some of the new functionality added to `driverbase`, so I attempted a rewrite (partly inspired by how [duckdb](https://github.com/duckdb/duckdb/blob/9ad037f3adfe372f17b5178a449ac4b6f9142240/src/common/adbc/adbc.cpp#L979) currently handles this). In addition to making the tests pass, the new approach is more performant and more transparent to users looking through the query log after using the ADBC driver. New test cases fail when run on current `main`: ``` --- FAIL: TestValidation (74.65s) --- FAIL: TestValidation/TestMetadataGetObjectsColumns (71.83s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/depth_catalog_no_filter (0.46s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/depth_dbSchema_no_filter (1.04s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/depth_table_no_filter (6.10s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/depth_column_no_filter (10.45s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_catalog_valid (4.26s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_catalog_invalid (0.29s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_dbSchema_valid (8.75s) --- FAIL: TestValidation/TestMetadataGetObjectsColumns/filter_dbSchema_invalid (8.10s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_table_valid (9.07s) --- FAIL: TestValidation/TestMetadataGetObjectsColumns/filter_table_invalid (12.04s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_column:_in% (9.20s) FAIL FAIL github.com/apache/arrow-adbc/go/adbc/driver/snowflake 75.545s ``` Same tests, using new implementation in this PR: ``` --- PASS: TestValidation (56.64s) --- PASS: TestValidation/TestMetadataGetObjectsColumns (53.69s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/depth_catalog_no_filter (1.16s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/depth_dbSchema_no_filter (1.19s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/depth_table_no_filter (4.34s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/depth_column_no_filter (6.13s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_catalog_valid (5.09s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_catalog_invalid (5.48s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_dbSchema_valid (6.81s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_dbSchema_invalid (5.35s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_table_valid (5.92s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_table_invalid (4.91s) --- PASS: TestValidation/TestMetadataGetObjectsColumns/filter_column:_in% (4.88s) PASS ok github.com/apache/arrow-adbc/go/adbc/driver/snowflake 57.253s ```
- Loading branch information