-
Notifications
You must be signed in to change notification settings - Fork 33
[PECOBLR-1575] cross catalog metadata operations in comparator #1229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: jdbc-comparator-updated
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,6 +95,87 @@ public Map<Map.Entry<String, Integer>, Set<Object[]>> getFunctionToArgsMap() { | |
| Map.entry("getAttributes", 4), | ||
| new String[] {"main", "tpcds_sf100_delta", "%", "%"}); | ||
|
|
||
| // Cross-catalog tests: null catalog (match all catalogs) | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getTables", 4), | ||
| new String[] {null, "tpcds_sf100_delta", "%", null}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getTablePrivileges", 3), | ||
| new String[] {null, "tpcds_sf100_delta", "%"}); | ||
| putInMapForKey(functionToArgsMap, Map.entry("getSchemas", 2), new String[] {null, "tpcds_%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getColumns", 4), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. similarly more combination here as well |
||
| new String[] {null, "tpcds_sf100_delta", "catalog_sales", "%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getPseudoColumns", 4), | ||
| new String[] {null, "tpcds_sf100_delta", "catalog_sales", "%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getColumnPrivileges", 4), | ||
| new String[] {null, "tpcds_sf100_delta", "catalog_sales", "%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getVersionColumns", 3), | ||
| new String[] {null, "tpcds_sf100_delta", "catalog_sales"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getFunctions", 3), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here also |
||
| new String[] {null, "tpcds_sf100_delta", "aggregate"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getFunctionColumns", 4), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we support this? |
||
| new String[] {null, "tpcds_sf100_delta", "aggregate", "%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getProcedures", 3), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here also more combination on schema being null, pattern |
||
| new String[] {null, "tpcds_sf100_delta", "%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getProcedureColumns", 4), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here also |
||
| new String[] {null, "tpcds_sf100_delta", "%", "%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getPrimaryKeys", 3), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we support null catalog here? Or just to compare results for null |
||
| new String[] {null, "oss_jdbc_tests", "test_result_set_types"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getImportedKeys", 3), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment |
||
| new String[] {null, "tpcds_sf100_delta", "catalog_sales"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 |
||
| Map.entry("getExportedKeys", 3), | ||
| new String[] {null, "tpcds_sf100_delta", "catalog_sales"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getCrossReference", 6), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
| new String[] { | ||
| null, "tpcds_sf100_delta", "catalog_sales", null, "tpcds_sf100_delta", "catalog_sales" | ||
| }); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getIndexInfo", 5), | ||
| new Object[] {null, "tpcds_sf100_delta", "catalog_sales", true, false}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getUDTs", 4), | ||
| new String[] {null, "tpcds_sf100_delta", "%", null}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getSuperTypes", 3), | ||
| new String[] {null, "tpcds_sf100_delta", "%"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getSuperTables", 3), | ||
| new String[] {null, "tpcds_sf100_delta", "catalog_sales"}); | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getAttributes", 4), | ||
| new String[] {null, "tpcds_sf100_delta", "%", "%"}); | ||
|
|
||
| // Methods for ResultSet concurrency and visibility | ||
| for (Integer type : getResultSetTypes()) { | ||
| putInMapForKey( | ||
|
|
@@ -129,6 +210,11 @@ public Map<Map.Entry<String, Integer>, Set<Object[]>> getFunctionToArgsMap() { | |
| functionToArgsMap, | ||
| Map.entry("getBestRowIdentifier", 5), | ||
| new Object[] {"main", "tpcds_sf100_delta", "catalog_sales", i, true}); | ||
| // Cross-catalog: null catalog | ||
| putInMapForKey( | ||
| functionToArgsMap, | ||
| Map.entry("getBestRowIdentifier", 5), | ||
| new Object[] {null, "tpcds_sf100_delta", "catalog_sales", i, true}); | ||
| } | ||
| for (Integer i : getResultSetHoldability()) { | ||
| putInMapForKey( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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