[PECOBLR-1575] cross catalog metadata operations in comparator#1229
Open
sreekanth-db wants to merge 1 commit intodatabricks:jdbc-comparator-updatedfrom
Open
[PECOBLR-1575] cross catalog metadata operations in comparator#1229sreekanth-db wants to merge 1 commit intodatabricks:jdbc-comparator-updatedfrom
sreekanth-db wants to merge 1 commit intodatabricks:jdbc-comparator-updatedfrom
Conversation
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
gopalldb
reviewed
Feb 26, 2026
| new String[] {"main", "tpcds_sf100_delta", "%", "%"}); | ||
|
|
||
| // Cross-catalog tests: null catalog (match all catalogs) | ||
| putInMapForKey( |
Collaborator
There was a problem hiding this comment.
lets also add some more combinations, like tableType being TABLE, VIEW apart from null
Also, schema can be pattern, schema can be null
also, table can be null
gopalldb
reviewed
Feb 26, 2026
| putInMapForKey(functionToArgsMap, Map.entry("getSchemas", 2), new String[] {null, "tpcds_%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getColumns", 4), |
Collaborator
There was a problem hiding this comment.
similarly more combination here as well
gopalldb
reviewed
Feb 26, 2026
| new String[] {null, "tpcds_sf100_delta", "catalog_sales"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getFunctions", 3), |
gopalldb
reviewed
Feb 26, 2026
| new String[] {null, "tpcds_sf100_delta", "aggregate"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getFunctionColumns", 4), |
gopalldb
reviewed
Feb 26, 2026
| new String[] {null, "tpcds_sf100_delta", "aggregate", "%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getProcedures", 3), |
Collaborator
There was a problem hiding this comment.
here also more combination on schema being null, pattern
gopalldb
reviewed
Feb 26, 2026
| new String[] {null, "tpcds_sf100_delta", "%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getProcedureColumns", 4), |
gopalldb
reviewed
Feb 26, 2026
| new String[] {null, "tpcds_sf100_delta", "%", "%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getPrimaryKeys", 3), |
Collaborator
There was a problem hiding this comment.
do we support null catalog here? Or just to compare results for null
gopalldb
reviewed
Feb 26, 2026
| new String[] {null, "oss_jdbc_tests", "test_result_set_types"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getImportedKeys", 3), |
gopalldb
reviewed
Feb 26, 2026
| Map.entry("getImportedKeys", 3), | ||
| new String[] {null, "tpcds_sf100_delta", "catalog_sales"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, |
Collaborator
There was a problem hiding this comment.
I believe this is empty and null anyways is not supported, what is goal, you can add a comment on what you are testing here
gopalldb
reviewed
Feb 26, 2026
| new String[] {null, "tpcds_sf100_delta", "catalog_sales"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getCrossReference", 6), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Added cross-catalog metadata tests to the JDBC comparator and fixed bug where all old(2.7.6) driver comparisons were failing due to JUnit 5's
autoCloseArgumentsdefault.Changes:
DatabaseMetaDatamethods that accept a catalog parameter (e.g.,getTables(null, ...),getSchemas(null, ...),getColumns(null, ...)), adding 42 new parameterized test invocations to validate cross-catalog metadata behavior.autoCloseArgumentsissue: JUnit 5.8+ defaults to calling.close()on anyAutoCloseableargument (Connection,ResultSet) after each parameterized test invocation. Since the comparator reuses the same connection objects across 4220+ test invocations, JUnit was silently closing them after the first invocation — causing 1917 test failures. SetautoCloseArguments = falseon all 5@ParameterizedTestannotations.ResultSetcomparison inResultSetComparatorwith try-catch to handle lazyResultSeterrors (e.g., old driver'sgetPrimaryKeys(null, ...)returns aResultSetthat throws server errors during iteration).Testing
NO_CHANGELOG=true