Made mapping for all known table engines to a table types in JDBC#2737
Open
Made mapping for all known table engines to a table types in JDBC#2737
Conversation
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|
JDBC V1 CoverageCoverage Report
Class Coverage
|
Client V1 CoverageCoverage Report
Class Coverage
|
jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/DatabaseMetaDataImpl.java
Outdated
Show resolved
Hide resolved
jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/DatabaseMetaDataImpl.java
Show resolved
Hide resolved
jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/DatabaseMetaDataImpl.java
Outdated
Show resolved
Hide resolved
jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/DatabaseMetaDataImpl.java
Show resolved
Hide resolved
|
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.




Summary
Closes #2664
Checklist
Delete items not relevant to your PR:
Note
Medium Risk
Changes the core
getTables()metadata query and filtering semantics, which can affect tool compatibility and may exclude/include tables differently (especially around unknown engines and temporary tables). The mapping is large and must stay in sync with ClickHouse engine additions.Overview
Improves JDBC v2 table metadata by introducing a comprehensive
ENGINE_TO_TABLE_TYPEmapping (includingMATERIALIZED VIEW) and using it to correctly classify tables returned byDatabaseMetaDataImpl.getTables().getTables()now filters results via engine/temporary/system predicates instead of a SQLCASE+TABLE_TYPE IN (...), returns engine names and then mutates them into JDBC table types viaDetachedResultSet(also ensuring temporary tables are excluded unless explicitly requested).getTableTypes()is updated to derive its list directly from theTableTypeenum.Adds integration tests to (1) assert all
system.table_enginesentries are mapped or handled bySystem*/Async*prefixes, and (2) validategetTables()filtering/classification across multiple concrete object types (table, view, materialized view, dictionary, log, memory, remote, and system). Updates theperformancemodule to useorg.testcontainers:testcontainers-clickhouseand bumps Testcontainers to2.0.2.Written by Cursor Bugbot for commit 267f13e. This will update automatically on new commits. Configure here.