Avatical Removal Part1: remove Avatica dependency from metadata conversion flow#136
Merged
Avatical Removal Part1: remove Avatica dependency from metadata conversion flow#136
Conversation
4bd32a0 to
40ea34f
Compare
mkaufmann
reviewed
Nov 13, 2025
jdbc-util/src/main/java/com/salesforce/datacloud/jdbc/metadata/SqlType.java
Outdated
Show resolved
Hide resolved
carsheng
commented
Nov 18, 2025
jdbc-core/src/main/java/com/salesforce/datacloud/jdbc/core/QueryMetadataUtil.java
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (83.65%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
============================================
- Coverage 82.79% 82.34% -0.46%
- Complexity 1347 1549 +202
============================================
Files 111 117 +6
Lines 4058 4328 +270
Branches 413 442 +29
============================================
+ Hits 3360 3564 +204
- Misses 508 549 +41
- Partials 190 215 +25
🚀 New features to boost your workflow:
|
282e5d0 to
d56d810
Compare
2d45c7c to
c28d02a
Compare
mkaufmann
reviewed
Feb 19, 2026
jdbc-core/src/main/java/com/salesforce/datacloud/jdbc/core/metadata/ColumnMetadata.java
Show resolved
Hide resolved
jdbc-core/src/main/java/com/salesforce/datacloud/jdbc/core/metadata/ColumnType.java
Outdated
Show resolved
Hide resolved
jdbc-core/src/main/java/com/salesforce/datacloud/jdbc/core/metadata/ColumnType.java
Outdated
Show resolved
Hide resolved
...-core/src/main/java/com/salesforce/datacloud/jdbc/core/metadata/SimpleResultSetMetaData.java
Show resolved
Hide resolved
...-core/src/main/java/com/salesforce/datacloud/jdbc/core/metadata/SimpleResultSetMetaData.java
Show resolved
Hide resolved
jdbc-core/src/main/java/com/salesforce/datacloud/jdbc/core/QueryMetadataUtil.java
Show resolved
Hide resolved
jdbc-core/src/main/java/com/salesforce/datacloud/jdbc/core/QueryMetadataUtil.java
Show resolved
Hide resolved
jdbc-core/src/main/java/com/salesforce/datacloud/jdbc/core/QueryMetadataUtil.java
Show resolved
Hide resolved
jdbc-core/src/main/java/com/salesforce/datacloud/jdbc/core/SimpleMetadataResultSet.java
Outdated
Show resolved
Hide resolved
jdbc-core/src/main/java/com/salesforce/datacloud/jdbc/core/QueryMetadataUtil.java
Outdated
Show resolved
Hide resolved
Contributor
|
I believe these will improve coverage:
|
KaviarasuSakthivadivel
added a commit
that referenced
this pull request
Mar 6, 2026
Bug: getTableTypes() was returning Map.toString() output instead of
table type names, violating the JDBC specification.
Root Cause: QueryMetadataUtil.constructTableTypesData() was using
entry.getValue() (Map<String,String>) instead of entry.getKey() (String).
Changes:
- Fix QueryMetadataUtil.java:320 - changed entry.getValue() to entry.getKey()
- Add test testGetTableTypesReturnsActualData() to verify correct behavior
Before fix:
getString("TABLE_TYPE") returned:
"{SCHEMAS=c.relkind = 'r' AND..., NOSCHEMAS=...}"
After fix:
getString("TABLE_TYPE") returns:
"TABLE", "VIEW", "INDEX", etc.
Impact:
- Fixes JDBC specification compliance
- Enables proper database tool integration (DBeaver, IntelliJ, etc.)
- Makes metadata introspection usable
Discovered during PR #136 review.
KaviarasuSakthivadivel
approved these changes
Mar 7, 2026
mkaufmann
approved these changes
Mar 9, 2026
KaviarasuSakthivadivel
added a commit
that referenced
this pull request
Mar 9, 2026
Bug: getTableTypes() was returning Map.toString() output instead of
table type names, violating the JDBC specification.
Root Cause: QueryMetadataUtil.constructTableTypesData() was using
entry.getValue() (Map<String,String>) instead of entry.getKey() (String).
Changes:
- Fix QueryMetadataUtil.java:320 - changed entry.getValue() to entry.getKey()
- Add test testGetTableTypesReturnsActualData() to verify correct behavior
Before fix:
getString("TABLE_TYPE") returned:
"{SCHEMAS=c.relkind = 'r' AND..., NOSCHEMAS=...}"
After fix:
getString("TABLE_TYPE") returns:
"TABLE", "VIEW", "INDEX", etc.
Impact:
- Fixes JDBC specification compliance
- Enables proper database tool integration (DBeaver, IntelliJ, etc.)
- Makes metadata introspection usable
Discovered during PR #136 review.
…eresultsetmetadata
ac6637a to
db2c660
Compare
KaviarasuSakthivadivel
approved these changes
Mar 11, 2026
KaviarasuSakthivadivel
added a commit
that referenced
this pull request
Mar 11, 2026
Bug: getTableTypes() was returning Map.toString() output instead of
table type names, violating the JDBC specification.
Root Cause: QueryMetadataUtil.constructTableTypesData() was using
entry.getValue() (Map<String,String>) instead of entry.getKey() (String).
Changes:
- Fix QueryMetadataUtil.java:320 - changed entry.getValue() to entry.getKey()
- Add test testGetTableTypesReturnsActualData() to verify correct behavior
Before fix:
getString("TABLE_TYPE") returned:
"{SCHEMAS=c.relkind = 'r' AND..., NOSCHEMAS=...}"
After fix:
getString("TABLE_TYPE") returns:
"TABLE", "VIEW", "INDEX", etc.
Impact:
- Fixes JDBC specification compliance
- Enables proper database tool integration (DBeaver, IntelliJ, etc.)
- Makes metadata introspection usable
Discovered during PR #136 review.
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.
This change accomplishes Part 1 of removing Avatica from the datacloud-jdbc driver - specifically focusing on marshalling of column metadata. It removes Avatica dependencies from metadata conversion and introduces a custom SimpleResultSet implementation for database metadata queries which includes much of the JDBc boilerplate that was originally handled by Avatica.
QueryMetadataUtil now uses SimpleMetadataResultSet.of() instead of Avatica-based constructors, and type mappings were updated to use standard JDBCType instead of Avatica's SqlType enum.