feat(bigquery-jdbc): support qualified project delimiter in DefaultDataset property - #14240
feat(bigquery-jdbc): support qualified project delimiter in DefaultDataset property#14240keshavdandeva wants to merge 4 commits into
DefaultDataset property#14240Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the default dataset parsing logic in BigQueryConnection by delegating it to a new utility method BigQueryJdbcUrlUtility.parseDefaultDataset, which supports both colon- and dot-delimited formats. It also updates BigQueryDatabaseMetaData to correctly resolve catalogs and schemas when a default dataset project is specified, and adds comprehensive unit tests. The review feedback suggests using lastIndexOf(':') instead of indexOf(':') to properly support domain-scoped projects (e.g., example.com:project-id:dataset-id) and recommends adding test cases to cover this scenario.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors default dataset parsing by delegating it to a new utility method BigQueryJdbcUrlUtility.parseDefaultDataset and updates BigQueryDatabaseMetaData to correctly handle default datasets that include a project ID. It also adds corresponding unit tests. The review feedback highlights a bug in the new parsing logic where domain-scoped projects using a dot separator (e.g., example.com:my-project.my_dataset) are parsed incorrectly, and provides a robust implementation to resolve this along with a suggestion to add a test case for this scenario.
DefaultDataset propertyDefaultDataset property
b/556170877
Parse
DefaultDatasetwith both ':' and '.' delimiters to support PCNT datasets and projectsKey Changes
DefaultDatasetParsing: ExtractedBigQueryJdbcUrlUtility.parseDefaultDataset()to support both:(e.g.project:warehouse.namespace) and.delimiters, ensuring consistent parsing across JDBC connection strings andDataSourceconfigurations.BigQueryDatabaseMetaData.determineEffectiveCatalogAndSchema()to usedefaultDataset.getProject()whenFilterTablesOnDefaultDataset=1is enabled.BigQueryDatabaseMetaData.getAccessibleCatalogNames()to include the project fromdefaultDatasetin the list of accessible catalogs.BigQueryJdbcUrlUtilityTestandBigQueryDatabaseMetaDataTestcovering multi-format parsing, namespace delimiters, and catalog filtering.