Conversation
After this comment, both JDBC type4 and ODBC Catalog API will support get the information about index. [TRAFODION-2079]([3rd party tool-Squirrel] indexes won't show up on objects panel, sql command line works fine) which related to Catalog API of JDBC type, it is fixed also.
|
Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/916/ |
|
Test Passed. https://jenkins.esgyn.com/job/Check-PR-master/916/ |
| "cast(3 as smallint) TYPE, " | ||
| "cast(0 as smallint) ORDINAL_POSITION, " | ||
| "cast('' as varchar(128)) COLUMN_NAME, " | ||
| "cast('' as char(1)) ASC_OR_DES, " |
There was a problem hiding this comment.
Spec says NULL should be returned when the value is not available. Can you please change it to NULL. Attaching a formatted output of this query when the table has index would be helpful to validate the results of the query by the reviewers. Consider creating a use case with two tables one with update statistics performed and another without.
There was a problem hiding this comment.
I will change it to null. I will add the test to ODBC test.
I think I still need add some new JDBC test. I will take some days.
|
Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/989/ |
|
Test Failed. https://jenkins.esgyn.com/job/Check-PR-master/989/ |
|
New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/993/ |
|
Test Failed. https://jenkins.esgyn.com/job/Check-PR-master/993/ |
|
New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/999/ |
|
Test Passed. https://jenkins.esgyn.com/job/Check-PR-master/999/ |
|
This looks good to me. |
| assertEquals(methondName + " rowNum " + Integer.toString(rowNum) + " dbAscOrDesc ", indexInfo.dbAscOrDesc, rs.getString("ASC_OR_DESC")); | ||
| assertEquals(methondName + " rowNum " + Integer.toString(rowNum) + " dbCardinality ", indexInfo.dbCardinality, rs.getInt("CARDINALITY")); | ||
| assertEquals(methondName + " rowNum " + Integer.toString(rowNum) + " dbPages ", indexInfo.dbPages, rs.getInt("PAGES")); | ||
| assertEquals(methondName + " rowNum " + Integer.toString(rowNum) + " dbFilterCondition ", indexInfo.dbFilterCondition, rs.getString("FILTER_CONDITION")); |
There was a problem hiding this comment.
It looks like value 0 is being compared with SQL value of null in case of numeric columns. Should we use wasNull() method to check if the column returned was really null.
There was a problem hiding this comment.
From the JDBC document, getInt() return 0 when the column is NULL, So I don't check wasNull().
However, it good to check more in the test case, I will add some the code that check the wasNull().
|
New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1020/ |
|
Test Failed. https://jenkins.esgyn.com/job/Check-PR-master/1020/ |
|
New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1021/ |
|
Test Passed. https://jenkins.esgyn.com/job/Check-PR-master/1021/ |
| assertEquals(methondName + " rowNum " + Integer.toString(rowNum) + " dbTableName ", indexInfo.dbTableName, rs.getString("TABLE_NAME")); | ||
| assertEquals(methondName + " rowNum " + Integer.toString(rowNum) + " dbNoneUnique ", indexInfo.dbNoneUnique, rs.getBoolean("NON_UNIQUE")); | ||
| // By the Document, dbNoneUnique will return null if the type is SQL_TABLE_STAT | ||
| System.out.println(rs.wasNull()); |
There was a problem hiding this comment.
Is it needed to display the wasNull. Where will the output go in Jenkins environment
|
+1 |
1 similar comment
|
+1 |
|
Merging with the assumption that any testware change due to the last comment by @selvaganesang can be addressed later. |
After this comment, both JDBC type4 and ODBC Catalog API will support
get the information about index.
[TRAFODION-2079]([3rd party tool-Squirrel] indexes won't show up on
objects panel, sql command line works fine) which related to Catalog
API of JDBC type, it is fixed also.