-
Notifications
You must be signed in to change notification settings - Fork 437
Updated getIndexInfo() to include Columnstore indexes by using custom query. #2598
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2598 +/- ##
============================================
+ Coverage 51.63% 51.72% +0.09%
- Complexity 4014 4026 +12
============================================
Files 147 147
Lines 33762 33797 +35
Branches 5641 5650 +9
============================================
+ Hits 17432 17482 +50
+ Misses 13893 13864 -29
- Partials 2437 2451 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/test/java/com/microsoft/sqlserver/jdbc/databasemetadata/DatabaseMetaDataTest.java
Show resolved
Hide resolved
src/test/java/com/microsoft/sqlserver/jdbc/databasemetadata/DatabaseMetaDataTest.java
Outdated
Show resolved
Hide resolved
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.
formatter not run
cf5d953
to
f84e086
Compare
ADO run: |
f84e086
to
e8f42a2
Compare
…merging sp_statistics with custom query results via CachedRowSet.
src/test/java/com/microsoft/sqlserver/jdbc/databasemetadata/DatabaseMetaDataTest.java
Show resolved
Hide resolved
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.
I assume this has been manually tested against a SQL DW (Synapse Analytics) instance. (Can use JDBC_DW.)
…in Azure Synapse Analytics, so dependent columns (CARDINALITY and PAGES) are set to NULL in the query for compatibility.
7e10f71
After validating with Azure SQL DW, the custom query was updated to account for the unsupported dm_db_partition_stats DMV by removing its usage and setting the dependent columns (CARDINALITY, PAGES) to NULL. Additionally, I observed that the original sp_statistics procedure does not return any indexes in DW. With the updated query, the default clustered index automatically created during table creation is now correctly retrieved. |
Replaced the use of the sp_statistics stored procedure with a custom query to retrieve index information as the sp_statistics procedure did not return Columnstore indexes, so a query using sys.indexes was implemented as a workaround.
This new query ensures that all index types (Clustered, NonClustered, Columnstore) are included in the result set.
Github Issue: #2546