Skip to content

Add jdbc-v2: read DatabaseMetaData with SHOW and DESCRIBE statements - #3168

Merged
chernser merged 5 commits into
mainfrom
polyglot/jdbc-metadata-show-statements
Oct 1, 2026
Merged

chernser merged 5 commits into
mainfrom
polyglot/jdbc-metadata-show-statements

Conversation

@polyglotAI-bot

@polyglotAI-bot polyglotAI-bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Closes #2907 (as requested by @chernser in #2907 (comment)).

DatabaseMetaData#getSchemas(), #getSchemas(String, String), #getTables and #getColumns can now read metadata with SHOW DATABASES, SHOW FULL TABLES and DESCRIBE TABLE instead of system.databases, system.tables and system.columns. A new driver property selects the implementation:

  • jdbc_metadata_use_show_statements (DriverProperties.METADATA_USE_SHOW_STATEMENTS), default true. Set it to false to use the system tables as before.

Why: the server does not show some databases and tables in the system.* tables by default. SHOW TABLES FROM <db> turns on show_data_lake_catalogs_in_system_tables / show_remote_databases_in_system_tables for the requested database (see InterpreterShowTablesQuery::execute in the server), but a plain SELECT … FROM system.tables does not. So tables of DataLakeCatalog (and remote) databases are listed only by the SHOW path.

Design

  • Seam: the four methods check the flag and call a private …WithShowStatements implementation. The legacy system.* code is not changed and runs when the flag is false.
  • Same result sets: the SHOW path builds rows on the client (new internal DetachedResultSet#createFromRecords) with the same column names, JDBC types and values as the system.* queries:
    • TABLE_TYPE uses the existing engine mapping (TABLE_TYPE_MUTATOR). The type filter keeps the existing behavior, including "only unknown types requested ⇒ all non-temporary tables".
    • COLUMN_SIZE, DECIMAL_DIGITS, NUM_PREC_RADIX and CHAR_OCTET_LENGTH are computed from the type the same way system.columns fills numeric_precision / numeric_precision_radix / numeric_scale / character_octet_length: only Nullable (and the SimpleAggregateFunction wrapper) is unwrapped; integers (incl. Bool) give their bit width, decimals their precision and scale, FixedString its length. DATA_TYPE uses the existing mutator.
    • getColumns() includes temporary tables (SHOW FULL TEMPORARY TABLES, empty TABLE_SCHEM) like system.columns. getTables() does not, like the legacy query (its JOIN system.databases drops them).
    • LIKE patterns are escaped like a PreparedStatement string parameter (the legacy getTables binds them with setString). Identifiers are back-quoted with \ and ` escaped.
  • Per-object errors: a database or table that fails with UNKNOWN_TABLE (60), UNKNOWN_DATABASE (81), ACCESS_DENIED (497) or DATALAKE_DATABASE_ERROR (736) is skipped (debug log), so one object does not fail the whole call. Examples: the object was dropped between SHOW and DESCRIBE; a user with only column-level grants, where SHOW TABLES lists the table but DESCRIBE needs SHOW COLUMNS on the whole table (system.columns shows only the granted columns); a data lake table whose metadata cannot be read. Other errors are still thrown.
  • Known differences (documented in docs/features.md and the property javadoc):
    • getTables() returns null in REMARKS and TYPE_SCHEM. SHOW TABLES returns no table comment and no database engine. In the SHOW-path result set these two columns are Nullable(String); the JDBC type is still VARCHAR.
    • getColumns() sends one DESCRIBE TABLE per matching table (plus one SHOW DATABASES, one SHOW FULL TABLES per matching database and, when the schema pattern matches '', one SHOW FULL TEMPORARY TABLES). A wide pattern such as getColumns(null, null, "%", null) therefore sends many more queries than the single system.columns query.
    • A table with column-level grants only is skipped by getColumns() (see above).
  • Server details handled on the client:
    • DESCRIBE settings are not changed in the query. A readonly=1 user gets Cannot modify 'print_pretty_type_names' setting in readonly mode from a SETTINGS clause. Instead, the multi-line named-tuple type names that print_pretty_type_names=1 (the server default) produces are normalized to the system.columns form. Rows with is_subcolumn / is_virtual = 1 are skipped, and missing default_expression / comment columns (describe_compact_output) are tolerated.
    • SHOW … LIKE '' is treated by the server as "no filter", but LIKE '' matches only an empty name. Empty schema and table patterns therefore return nothing, the same as the system.* queries.
    • DESCRIBE cannot be a subquery, so the column-name pattern is matched on the client with ClickHouse LIKE semantics (%, _, \ escape; case-sensitive). The expected values in the unit test were checked against the server's LIKE.

Changes

  • DriverProperties: new METADATA_USE_SHOW_STATEMENTS constant (appended).
  • DatabaseMetaDataImpl: flag dispatch in getSchemas ×2 / getTables / getColumns, plus the SHOW/DESCRIBE implementation.
  • DetachedResultSet: createFromRecords factory for client-built rows.
  • Tests: DatabaseMetaDataTest (parity + flag tests; they also run in DatabaseMetaDataWithEmptyFormatTest), new DatabaseMetaDataImplLikeMatcherTest (unit).
  • CHANGELOG.md, docs/features.md.

Test

  • All existing DatabaseMetaDataTest / DatabaseMetaDataWithEmptyFormatTest tests now run on the SHOW path (default) and pass unchanged.
  • testShowStatementsReturnSameMetadataAsSystemTables (@DataProvider, 14 cases): runs the same getColumns / getTables / getSchemas call on a default connection and on a jdbc_metadata_use_show_statements=false connection. It asserts equal column labels, JDBC types, type names and nullability, and equal rows (excluding only REMARKS / TYPE_SCHEM for getTables). It also asserts that rows exist where they must. The fixture has a wide type set (integers incl. Int128/UInt256, Bool, Nullable(Bool), decimals, FixedString, Nullable(FixedString), LowCardinality(FixedString), nested named tuples, Map, JSON(a.b UInt32), SimpleAggregateFunction, DEFAULT/MATERIALIZED/ALIAS/EPHEMERAL columns, column comments), a view, a materialized view and a table whose table and column names contain a space, ., ', ", ` and \. Patterns include a column prefix, escaped \_ in column/table patterns, a schema pattern with a wildcard, empty patterns, VIEW/MATERIALIZED VIEW and unknown type filters, and system tables. A mutation check (remove Bool from the integer set, disable the pretty-name normalization) makes this test fail.
  • testTableRemarksDependOnShowStatementsFlag (@DataProvider): pins the default (true) and both explicit values.
  • testGetColumnsForReadonlyUserWithColumnGrants (@DataProvider, skipped on cloud like ReadonlyProfileTest): a readonly=1 user with a full grant on one table and a column-level grant on another. The SHOW path works for readonly=1, returns the normalized named-tuple type, and skips the table it cannot describe; the legacy path returns the granted column. The user has a random password and is dropped in finally. Grants are on the test database only.
  • DatabaseMetaDataImplLikeMatcherTest (unit): LIKE edge cases (null/empty pattern, %, _, escapes, regex metacharacters, case, newline, surrogate pair).
  • Ran locally:
  • A DataLakeCatalog database needs an external catalog, so CI cannot create one. Its visibility follows from the server code referenced above.

Size

About 320 lines in DatabaseMetaDataImpl, mostly the result-set column definitions and the per-row mapping needed for parity. Tests add about 240 lines.

Possible follow-ups (not in this PR)

  • Use system.columns for ordinary databases and DESCRIBE only for data lake / remote databases, to avoid the per-table queries.
  • Fill TYPE_SCHEM from a database-engine lookup. This PR leaves it null to avoid system.* reads, as requested.

Compatibility

  • Default behavior changes (the flag is on by default, as requested): getTables() REMARKS / TYPE_SCHEM become null, and getColumns() sends more queries. All other values are the same (see the parity test). jdbc_metadata_use_show_statements=false restores the previous behavior exactly. The maintainer may prefer to list this entry under "Breaking Changes" in the CHANGELOG.
  • No public method signatures change. One new enum constant is appended to DriverProperties.

changes_checklist.md

  • New configuration property added: key jdbc_metadata_use_show_statements is unique and follows the jdbc_* naming. Boolean, default true, parsed with JdbcConfiguration#isFlagSet like the sibling flags. Documented in the javadoc and docs/features.md. Focused tests added.
  • Default value added or changed: the new default changes getTables() REMARKS / TYPE_SCHEM (see Compatibility). All other getSchemas / getTables / getColumns output is pinned equal by the parity test.
  • Enum constant added: appended at the end of DriverProperties. No switch statements use this enum.
  • New method added: DetachedResultSet#createFromRecords is in the internal package, which is documented as not for application use.

Pre-PR validation gate

  • Works through the real entry points (Connection#getMetaData() → getSchemas / getTables / getColumns)
  • Property name/shape matches sibling DriverProperties flags
  • All four methods covered; temporary tables, views, empty/escaped patterns and type filters included
  • Tests pin intended behavior (parity with the system.* path; mutation-checked); no existing test was edited
  • CHANGELOG.md and docs/features.md updated
  • Follows AGENTS.md / docs/ai-review.md / docs/changes_checklist.md

🤖 Generated with Claude Code

getSchemas(), getTables() and getColumns() now use SHOW DATABASES,
SHOW FULL TABLES and DESCRIBE TABLE instead of system.databases,
system.tables and system.columns. SHOW TABLES FROM <db> also lists the
tables that the server hides from system.tables by default (tables of
DataLakeCatalog and remote databases).

The new driver property jdbc_metadata_use_show_statements (default true)
selects the implementation; false keeps the system table queries.
The result sets have the same columns and values, except that
getTables() returns null in REMARKS and TYPE_SCHEM. getColumns() skips
a table that fails with UNKNOWN_TABLE, UNKNOWN_DATABASE, ACCESS_DENIED
or DATALAKE_DATABASE_ERROR.

Implements: #2907

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/DatabaseMetaDataImpl.java Outdated
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Client V2 Coverage

Coverage Report

Package Coverage Lines Covered Total Lines
com.clickhouse.client.api 88.10% 1103 1252
com.clickhouse.client.api.command 43.33% 13 30
com.clickhouse.client.api.data_formats 67.77% 431 636
com.clickhouse.client.api.data_formats.internal 82.12% 2163 2634
com.clickhouse.client.api.enums 100.00% 14 14
com.clickhouse.client.api.http 0.00% 1
com.clickhouse.client.api.insert 93.20% 96 103
com.clickhouse.client.api.internal 86.93% 1423 1637
com.clickhouse.client.api.metadata 90.74% 49 54
com.clickhouse.client.api.metrics 94.12% 80 85
com.clickhouse.client.api.observability 96.04% 194 202
com.clickhouse.client.api.observability.micrometer 100.00% 57 57
com.clickhouse.client.api.observability.otel 98.65% 73 74
com.clickhouse.client.api.query 86.16% 137 159
com.clickhouse.client.api.serde 87.72% 50 57
com.clickhouse.client.api.sql 87.50% 28 32
com.clickhouse.client.api.transport 94.25% 82 87
Class Coverage
Class Coverage Lines Covered Total Lines
com.clickhouse.client.api.ClickHouseException 85.71% 12 14
com.clickhouse.client.api.Client 91.31% 473 518
com.clickhouse.client.api.Client.Builder 86.54% 225 260
com.clickhouse.client.api.Client.new DataStreamWriter() {...} 100.00% 8 8
com.clickhouse.client.api.ClientConfigProperties 94.29% 198 210
com.clickhouse.client.api.ClientConfigProperties.new ClientConfigProperties() {...} 100.00% 8 8
com.clickhouse.client.api.ClientException 66.67% 4 6
com.clickhouse.client.api.ClientFaultCause 100.00% 8 8
com.clickhouse.client.api.ClientMisconfigurationException 100.00% 4 4
com.clickhouse.client.api.command.CommandResponse 47.06% 8 17
com.clickhouse.client.api.command.CommandSettings 38.46% 5 13
com.clickhouse.client.api.CompressionMethod 100.00% 3 3
com.clickhouse.client.api.ConnectionInitiationException 50.00% 3 6
com.clickhouse.client.api.ConnectionReuseStrategy 100.00% 3 3
com.clickhouse.client.api.data_formats.GsonJsonParserFactory 100.00% 10 10
com.clickhouse.client.api.data_formats.GsonJsonParserFactory.JsonParserImpl 100.00% 11 11
com.clickhouse.client.api.data_formats.GsonJsonParserFactory.new TypeToken() {...} 100.00% 1 1
com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader 76.50% 319 417
com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader.RecordWrapper 50.00% 17 34
com.clickhouse.client.api.data_formats.internal.BinaryReaderBackedRecord 14.77% 13 88
com.clickhouse.client.api.data_formats.internal.BinaryStreamReader 94.25% 574 609
com.clickhouse.client.api.data_formats.internal.BinaryStreamReader.ArrayValue 83.72% 36 43
com.clickhouse.client.api.data_formats.internal.BinaryStreamReader.CachingByteBufferAllocator 100.00% 8 8
com.clickhouse.client.api.data_formats.internal.BinaryStreamReader.DefaultByteBufferAllocator 100.00% 2 2
com.clickhouse.client.api.data_formats.internal.BinaryStreamReader.EnumValue 80.00% 8 10
com.clickhouse.client.api.data_formats.internal.InetAddressConverter 66.67% 18 27
com.clickhouse.client.api.data_formats.internal.MapBackedRecord 59.40% 139 234
com.clickhouse.client.api.data_formats.internal.NumberConverter 92.47% 86 93
com.clickhouse.client.api.data_formats.internal.NumberConverter.NumberType 100.00% 7 7
com.clickhouse.client.api.data_formats.internal.ProcessParser 85.71% 36 42
com.clickhouse.client.api.data_formats.internal.SerializerUtils 89.21% 777 871
com.clickhouse.client.api.data_formats.internal.SerializerUtils.DynamicClassLoader 100.00% 3 3
com.clickhouse.client.api.data_formats.internal.StringValue 97.14% 34 35
com.clickhouse.client.api.data_formats.internal.ValueConverters 77.48% 86 111
com.clickhouse.client.api.data_formats.JacksonJsonParserFactory 100.00% 5 5
com.clickhouse.client.api.data_formats.JacksonJsonParserFactory.JsonParserImpl 100.00% 8 8
com.clickhouse.client.api.data_formats.JSONEachRowFormatReader 95.12% 195 205
com.clickhouse.client.api.data_formats.NativeFormatReader 91.49% 86 94
com.clickhouse.client.api.data_formats.NativeFormatReader.Block 66.67% 12 18
com.clickhouse.client.api.data_formats.RowBinaryFormatReader 15.79% 3 19
com.clickhouse.client.api.data_formats.RowBinaryFormatSerializer 28.83% 32 111
com.clickhouse.client.api.data_formats.RowBinaryFormatWriter 32.67% 33 101
com.clickhouse.client.api.data_formats.RowBinaryFormatWriter.InputStreamHolder 0.00% 4
com.clickhouse.client.api.data_formats.RowBinaryFormatWriter.ReaderHolder 0.00% 4
com.clickhouse.client.api.data_formats.RowBinaryWithNamesAndTypesFormatReader 100.00% 22 22
com.clickhouse.client.api.data_formats.RowBinaryWithNamesFormatReader 56.52% 13 23
com.clickhouse.client.api.DataStreamWriter 0.00% 1
com.clickhouse.client.api.DataTransferException 50.00% 2 4
com.clickhouse.client.api.DataTypeUtils 60.83% 73 120
com.clickhouse.client.api.enums.Protocol 100.00% 2 2
com.clickhouse.client.api.enums.ProxyType 100.00% 3 3
com.clickhouse.client.api.enums.SSLMode 100.00% 9 9
com.clickhouse.client.api.http.ClickHouseHttpProto 0.00% 1
com.clickhouse.client.api.insert.InsertResponse 100.00% 15 15
com.clickhouse.client.api.insert.InsertSettings 92.05% 81 88
com.clickhouse.client.api.internal.BaseCollectionConverter 100.00% 28 28
com.clickhouse.client.api.internal.BaseCollectionConverter.BaseArrayWriter 100.00% 6 6
com.clickhouse.client.api.internal.BaseCollectionConverter.BaseCollectionWriter 71.43% 15 21
com.clickhouse.client.api.internal.BaseCollectionConverter.BaseListWriter 100.00% 6 6
com.clickhouse.client.api.internal.BaseCollectionConverter.ListConversionState 100.00% 11 11
com.clickhouse.client.api.internal.BasicObjectsPool 0.00% 11
com.clickhouse.client.api.internal.CachingObjectsSupplier 0.00% 10
com.clickhouse.client.api.internal.ClientStatisticsHolder 50.00% 7 14
com.clickhouse.client.api.internal.ClientUtils 100.00% 8 8
com.clickhouse.client.api.internal.CommonSettings 97.22% 70 72
com.clickhouse.client.api.internal.CompressedBlockEntity 82.61% 38 46
com.clickhouse.client.api.internal.CompressedBlockInputStream 92.77% 77 83
com.clickhouse.client.api.internal.CompressedBlockOutputStream 91.80% 56 61
com.clickhouse.client.api.internal.CompressedBlockOutputStream.LZ4OutputStream 100.00% 6 6
com.clickhouse.client.api.internal.CompressedBlockOutputStream.ZSTDOutputStream 100.00% 6 6
com.clickhouse.client.api.internal.CompressedEntity 80.00% 28 35
com.clickhouse.client.api.internal.CredentialsManager 95.38% 62 65
com.clickhouse.client.api.internal.DataTypeConverter 92.16% 235 255
com.clickhouse.client.api.internal.DataTypeConverter.ArrayAsStringWriter 100.00% 18 18
com.clickhouse.client.api.internal.DataTypeConverter.ListAsStringWriter 100.00% 16 16
com.clickhouse.client.api.internal.DataTypeConverter.Literal 100.00% 3 3
com.clickhouse.client.api.internal.EnvUtils 0.00% 14
com.clickhouse.client.api.internal.Gauge 66.67% 4 6
com.clickhouse.client.api.internal.HttpAPIClientHelper 93.41% 510 546
com.clickhouse.client.api.internal.HttpAPIClientHelper.CustomSSLConnectionFactory 100.00% 11 11
com.clickhouse.client.api.internal.HttpAPIClientHelper.DummySSLConnectionSocketFactory 0.00% 3
com.clickhouse.client.api.internal.HttpAPIClientHelper.MeteredManagedHttpClientConnectionFactory 50.00% 7 14
com.clickhouse.client.api.internal.HttpAPIClientHelper.TransportRequestImpl 100.00% 12 12
com.clickhouse.client.api.internal.HttpAPIClientHelper.TransportResponseImpl 81.25% 13 16
com.clickhouse.client.api.internal.MapUtils 35.48% 22 62
com.clickhouse.client.api.internal.SchemaUtils 100.00% 24 24
com.clickhouse.client.api.internal.ServerSettings 0.00% 1
com.clickhouse.client.api.internal.SslContextProvider 92.68% 38 41
com.clickhouse.client.api.internal.SslContextProvider.Builder 100.00% 38 38
com.clickhouse.client.api.internal.SslContextProvider.NonValidatingTrustManager 75.00% 3 4
com.clickhouse.client.api.internal.StopWatch 66.67% 10 15
com.clickhouse.client.api.internal.TableSchemaParser 80.77% 21 26
com.clickhouse.client.api.internal.ValidationUtils 55.00% 11 20
com.clickhouse.client.api.internal.ValidationUtils.SettingsValidationException 100.00% 3 3
com.clickhouse.client.api.metadata.DefaultColumnToMethodMatchingStrategy 100.00% 13 13
com.clickhouse.client.api.metadata.NoSuchColumnException 0.00% 2
com.clickhouse.client.api.metadata.TableSchema 92.31% 36 39
com.clickhouse.client.api.metrics.ClientMetrics 100.00% 7 7
com.clickhouse.client.api.metrics.MicrometerLoader 90.91% 40 44
com.clickhouse.client.api.metrics.OperationMetrics 94.74% 18 19
com.clickhouse.client.api.metrics.OperationType 100.00% 3 3
com.clickhouse.client.api.metrics.ServerMetrics 100.00% 12 12
com.clickhouse.client.api.observability.DefaultMetricsRecorder 100.00% 9 9
com.clickhouse.client.api.observability.DefaultSpanRecorder 100.00% 12 12
com.clickhouse.client.api.observability.DefaultSpanRecorder.NoopSpan 75.00% 3 4
com.clickhouse.client.api.observability.MetricAttribute 100.00% 11 11
com.clickhouse.client.api.observability.MetricName 100.00% 13 13
com.clickhouse.client.api.observability.MetricsSupport 92.31% 36 39
com.clickhouse.client.api.observability.micrometer.MicrometerMetricsRecorder 100.00% 57 57
com.clickhouse.client.api.observability.otel.OpenTelemetrySpanRecorder 100.00% 47 47
com.clickhouse.client.api.observability.otel.OpenTelemetrySpanRecorder.OpenTelemetrySpan 96.30% 26 27
com.clickhouse.client.api.observability.SpanAttribute 100.00% 25 25
com.clickhouse.client.api.observability.SpanSupport 95.51% 85 89
com.clickhouse.client.api.query.NullValueException 50.00% 2 4
com.clickhouse.client.api.query.QueryResponse 86.49% 32 37
com.clickhouse.client.api.query.QuerySettings 97.67% 84 86
com.clickhouse.client.api.query.QueryStatement 0.00% 4
com.clickhouse.client.api.query.Records 60.87% 14 23
com.clickhouse.client.api.query.Records.new Iterator() {...} 100.00% 5 5
com.clickhouse.client.api.serde.DataSerializationException 33.33% 2 6
com.clickhouse.client.api.serde.POJOSerDe 97.96% 48 49
com.clickhouse.client.api.serde.SerializerNotFoundException 0.00% 2
com.clickhouse.client.api.ServerException 100.00% 13 13
com.clickhouse.client.api.ServerException.ErrorCodes 100.00% 9 9
com.clickhouse.client.api.Session 100.00% 46 46
com.clickhouse.client.api.sql.SQLUtils 87.50% 28 32
com.clickhouse.client.api.transport.ClientNodeSelector 100.00% 21 21
com.clickhouse.client.api.transport.EndpointState 100.00% 10 10
com.clickhouse.client.api.transport.HttpEndpoint 90.00% 45 50
com.clickhouse.client.api.transport.HttpEndpoint.EndpointDetails 100.00% 6 6
com.clickhouse.client.api.TransportException 100.00% 3 3

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

JDBC V2 Coverage

Coverage Report

Package Coverage Lines Covered Total Lines
com.clickhouse.data 19.23% 5 26
com.clickhouse.jdbc 82.03% 1771 2159
com.clickhouse.jdbc.internal 89.78% 1336 1488
com.clickhouse.jdbc.internal.parser.antlr4 40.96% 6441 15727
com.clickhouse.jdbc.internal.parser.javacc 73.14% 4961 6783
com.clickhouse.jdbc.metadata 90.23% 831 921
com.clickhouse.jdbc.types 56.09% 290 517
Class Coverage
Class Coverage Lines Covered Total Lines
com.clickhouse.data.Tuple 19.23% 5 26
com.clickhouse.jdbc.ClientInfoProperties 100.00% 12 12
com.clickhouse.jdbc.ConnectionImpl 91.28% 272 298
com.clickhouse.jdbc.DataSourceImpl 96.15% 25 26
com.clickhouse.jdbc.Driver 78.26% 36 46
com.clickhouse.jdbc.Driver.FrameworksDetection 90.91% 10 11
com.clickhouse.jdbc.DriverProperties 93.94% 31 33
com.clickhouse.jdbc.internal.DetachedResultSet 80.68% 334 414
com.clickhouse.jdbc.internal.ExceptionUtils 72.00% 18 25
com.clickhouse.jdbc.internal.FeatureManager 100.00% 8 8
com.clickhouse.jdbc.internal.JdbcConfiguration 95.26% 201 211
com.clickhouse.jdbc.internal.JdbcUtils 90.09% 382 424
com.clickhouse.jdbc.internal.JdbcUtils.ArrayProcessingCursor 100.00% 11 11
com.clickhouse.jdbc.internal.ParsedPreparedStatement 96.23% 51 53
com.clickhouse.jdbc.internal.ParsedStatement 93.75% 15 16
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseLexer 77.78% 28 36
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser 45.81% 4853 10594
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AliasContext 66.67% 6 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterPrivilegeContext 0.00% 44
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterStmtContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseAddColumnContext 41.67% 5 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseAddIndexContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseAddProjectionContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseAlterTypeContext 31.25% 5 16
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseAttachContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseClearColumnContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseClearIndexContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseClearProjectionContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseCommentContext 0.00% 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseDeleteContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseDetachContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseDropColumnContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseDropIndexContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseDropPartitionContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseDropProjectionContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseFreezePartitionContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseMaterializeIndexContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseMaterializeProjectionContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseModifyCodecContext 0.00% 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseModifyCommentContext 38.46% 5 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseModifyContext 50.00% 5 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseModifyOrderByContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseModifyRemoveContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseModifyTTLContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseMovePartitionContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseRemoveTTLContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseRenameContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseReplaceContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableClauseUpdateContext 0.00% 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableColumnPositionContext 60.00% 6 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AlterTableStmtContext 38.46% 5 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ArrayJoinClauseContext 50.00% 6 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AssignmentExprContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AssignmentExprListContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AssignmentValueContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AssignmentValuesContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AssignmentValuesEmptyContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AssignmentValuesListContext 45.45% 5 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.AttachStmtContext 33.33% 6 18
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CheckAllTablesStmtContext 0.00% 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CheckGrantStmtContext 45.45% 5 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CheckStmtContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CheckTableStmtContext 35.71% 5 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ClusterClauseContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CodecArgExprContext 0.00% 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CodecExprContext 0.00% 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnAliasesContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnArgExprContext 66.67% 6 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnArgListContext 46.15% 6 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExceptExprContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExceptExprIdentifiersContext 41.67% 5 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExceptExprRegexpContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprAgrFuncWithFilterContext 38.46% 5 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprAliasContext 55.56% 5 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprAndContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprArrayAccessContext 55.56% 5 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprArrayContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprAsteriskContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprBetweenContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprCaseContext 35.71% 5 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprCast2Context 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprCastContext 45.45% 5 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprDateContext 71.43% 5 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprExtractContext 0.00% 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprFunctionContext 38.46% 5 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprIdentifierContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprIntervalContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprIsNullContext 55.56% 5 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprListContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprLiteralContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprNegateContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprNotContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprOrContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprParamContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprParensContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprPrecedence1Context 50.00% 5 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprPrecedence2Context 50.00% 5 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprPrecedence3Context 26.32% 5 19
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprRegexpContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprSubqueryContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprSubstringContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprTernaryOpContext 55.56% 5 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprTimestampContext 71.43% 5 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprTrimContext 0.00% 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprTupleAccessContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprTupleContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprWinFunctionContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnExprWinFunctionTargetContext 0.00% 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnIdentifierContext 60.00% 6 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnLambdaExprContext 40.00% 6 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnPrivilegeContext 42.86% 6 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnsClauseContext 53.85% 7 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnsExprAsteriskContext 55.56% 5 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnsExprColumnContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnsExprContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnsExprSubqueryContext 0.00% 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnTypeExprComplexContext 41.67% 5 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnTypeExprContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnTypeExprEnumContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnTypeExprNestedContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnTypeExprParamContext 55.56% 5 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ColumnTypeExprSimpleContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateDatabaseStmtContext 38.46% 5 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateDictionaryStmtContext 21.74% 5 23
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateFunctionStmtContext 33.33% 5 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateLiveViewStmtContext 0.00% 21
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateMaterializedViewStmtContext 0.00% 20
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateNamedCollectionStmtContext 27.78% 5 18
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreatePolicyStmtContext 17.24% 5 29
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreatePrivilegeContext 0.00% 24
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateProfileStmtContext 14.71% 5 34
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateQuotaStmtContext 18.52% 5 27
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateRoleStmtContext 26.32% 5 19
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateStmtContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateTableStmtContext 25.00% 5 20
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateUserStmtContext 17.86% 5 28
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CreateViewStmtContext 26.32% 5 19
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CteClauseContext 40.00% 6 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CteUnboundColContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CteUnboundColExprContext 50.00% 5 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CteUnboundColLiteralContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CteUnboundColParamContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.CteUnboundSubQueryContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DatabaseIdentifierContext 63.64% 7 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DataClauseContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DataClauseFormatContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DataClauseSelectContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DataClauseValuesContext 60.00% 6 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DeleteStmtContext 42.86% 6 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DescribeStmtContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DestinationClauseContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DictionaryArgExprContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DictionaryAttrDfntContext 40.00% 6 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DictionaryEngineClauseContext 75.00% 6 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DictionaryPrimaryKeyClauseContext 46.15% 6 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DictionarySchemaClauseContext 46.15% 6 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DictionarySettingsClauseContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DropPrivilegeContext 0.00% 24
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.DropStmtContext 15.00% 6 40
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.EngineClauseContext 75.00% 6 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.EngineExprContext 46.15% 6 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.EnumValueContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ExchangeStmtContext 42.86% 6 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ExistsDatabaseStmtContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ExistsStmtContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ExistsTableStmtContext 31.25% 5 16
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ExplainStmtContext 33.33% 6 18
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.FilenameContext 0.00% 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.FloatingLiteralContext 50.00% 6 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.FrameBetweenContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.FrameStartContext 0.00% 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.FromClauseContext 36.84% 7 19
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.GrantStmtContext 20.69% 6 29
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.GrantTableIdentifierContext 50.00% 6 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.GroupByClauseContext 42.86% 6 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.HavingClauseContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.IdentifierContext 50.00% 6 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.IdentifierOrNullContext 66.67% 6 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.InserParameterExprContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.InsertParameterContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.InsertParameterFuncExprContext 55.56% 5 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.InsertRawValueContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.InsertStmtContext 60.00% 9 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.IntervalContext 40.00% 6 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.JoinConstraintClauseContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.JoinExprContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.JoinExprCrossOpContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.JoinExprOpContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.JoinExprParensContext 0.00% 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.JoinExprTableContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.JoinOpContext 0.00% 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.JoinOpCrossContext 50.00% 6 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.JoinOpFullContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.JoinOpInnerContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.JoinOpLeftRightContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.KeywordContext 1.88% 6 319
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.KeywordForAliasContext 2.32% 6 259
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.KillMutationStmtContext 35.71% 5 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.KillQueryStmtContext 35.71% 5 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.KillStmtContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.LayoutClauseContext 40.00% 6 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.LifetimeClauseContext 42.86% 6 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.LimitByClauseContext 0.00% 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.LimitClauseContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.LimitExprContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.LiteralContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.MoveStmtContext 33.33% 6 18
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.NameCollectionKeyContext 50.00% 6 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.NamedQueryContext 40.00% 6 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.NestedIdentifierContext 70.00% 7 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.NumberLiteralContext 40.00% 6 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.OptimizeByExprContext 30.00% 6 20
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.OptimizeStmtContext 40.00% 6 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.OrderByClauseContext 60.00% 6 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.OrderExprContext 37.50% 6 16
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.OrderExprListContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.PartitionByClauseContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.PartitionClauseContext 0.00% 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.PrewhereClauseContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.PrimaryKeyClauseContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.PrivelegeListContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.PrivilegeContext 13.64% 6 44
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ProjectionOrderByClauseContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ProjectionSelectStmtContext 0.00% 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.QueryContext 38.24% 13 34
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.QueryStmtContext 46.67% 7 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.QuotaForClauseContext 33.33% 6 18
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.QuotaMaxExprContext 60.00% 6 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.RangeClauseContext 0.00% 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.RatioExprContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.RenameStmtContext 37.50% 6 16
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.RevokeStmtContext 26.09% 6 23
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SampleByClauseContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SampleClauseContext 0.00% 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SchemaAsFunctionClauseContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SchemaAsTableClauseContext 71.43% 5 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SchemaDescriptionClauseContext 45.45% 5 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SelectStmtContext 21.43% 6 28
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SelectStmtWithParensContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SelectUnionStmtContext 40.00% 6 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SetRolesListContext 63.64% 7 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SetRoleStmtContext 38.10% 8 21
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SetStmtContext 60.00% 6 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SettingExprContext 60.00% 6 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SettingExprListContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SettingsClauseContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowAccessStmtContext 71.43% 5 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowClustersStmtContext 27.78% 5 18
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowClusterStmtContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowColumnsStmtContext 23.81% 5 21
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowCreatePolicyStmtContext 41.67% 5 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowCreateProfileContext 38.46% 5 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowCreateQuotaStmtContext 38.46% 5 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowCreateRoleStmtContext 41.67% 5 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowCreateStmtContext 27.78% 5 18
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowCreateUserStmtContext 38.46% 5 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowDatabasesStmtContext 0.00% 18
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowDictionariesStmtContext 26.32% 5 19
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowEnginesStmtContext 41.67% 5 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowFromDbClauseContext 60.00% 6 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowFromTableFromDbClauseContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowFSCachesStmtContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowFunctionsStmtContext 45.45% 5 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowGrantsStmtContext 33.33% 5 15
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowIndexStmtContext 22.73% 5 22
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowMergesStmtContext 27.78% 5 18
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowPoliciesStmtContext 50.00% 5 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowPrivilegeContext 0.00% 25
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowProcessListStmtContext 41.67% 5 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowProfilesStmtContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowQuotasStmtContext 71.43% 5 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowQuotaStmtContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowRolesStmtContext 55.56% 5 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowSettingsStmtContext 45.45% 5 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowSettingStmtContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowStmtContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowTablesStmtContext 23.81% 5 21
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ShowUsersStmtContext 71.43% 5 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SourceClauseContext 42.86% 6 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SourcePrivilegeContext 0.00% 25
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SubqueryClauseContext 66.67% 6 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SystemPrivilegeContext 0.00% 81
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.SystemStmtContext 5.88% 6 102
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableArgExprContext 60.00% 6 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableArgListContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableColumnDfntContext 35.29% 6 17
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableColumnPropertyExprContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableColumnPropertyTypeContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableElementExprColumnContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableElementExprConstraintContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableElementExprContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableElementExprIndexContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableElementExprProjectionContext 0.00% 7
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableExprAliasContext 55.56% 5 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableExprContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableExprFunctionContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableExprIdentifierContext 100.00% 6 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableExprSubqueryContext 62.50% 5 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableFunctionExprContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableIdentifierContext 80.00% 8 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableIndexDfntContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableProjectionDfntContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TableSchemaClauseContext 83.33% 5 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TopClauseContext 0.00% 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TruncateStmtContext 42.86% 6 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TtlClauseContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.TtlExprContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.UndropStmtContext 50.00% 6 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.UpdateStmtContext 46.15% 6 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.UserCreateGranteesClauseContext 0.00% 19
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.UserCreateHostClauseContext 0.00% 14
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.UserCreateHostDefContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.UserIdentifiedClauseContext 27.27% 6 22
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.UserIdentifiedWithClauseContext 17.14% 6 35
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.UserIdentifierContext 54.55% 6 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.UseStmtContext 77.78% 7 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.UuidClauseContext 66.67% 6 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ValidUntilClauseContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ViewIdentifierContext 0.00% 8
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.ViewParamContext 63.64% 7 11
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.WatchStmtContext 0.00% 12
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.WhereClauseContext 66.67% 6 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.WindowClauseContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.WindowExprContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.WinFrameBoundContext 0.00% 13
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.WinFrameClauseContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.WinFrameExtendContext 0.00% 6
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.WinOrderByClauseContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.WinPartitionByClauseContext 0.00% 10
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.WithClauseContext 0.00% 9
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParserBaseListener 64.76% 384 593
com.clickhouse.jdbc.internal.parser.javacc.AbstractCharStream 52.04% 102 196
com.clickhouse.jdbc.internal.parser.javacc.ClickHouseSqlParser 72.89% 2963 4065
com.clickhouse.jdbc.internal.parser.javacc.ClickHouseSqlParserConstants 100.00% 1 1
com.clickhouse.jdbc.internal.parser.javacc.ClickHouseSqlParserTokenManager 84.25% 1728 2051
com.clickhouse.jdbc.internal.parser.javacc.ClickHouseSqlStatement 38.78% 57 147
com.clickhouse.jdbc.internal.parser.javacc.ClickHouseSqlUtils 68.57% 24 35
com.clickhouse.jdbc.internal.parser.javacc.JdbcParseHandler 24.05% 19 79
com.clickhouse.jdbc.internal.parser.javacc.LanguageType 100.00% 6 6
com.clickhouse.jdbc.internal.parser.javacc.OperationType 100.00% 2 2
com.clickhouse.jdbc.internal.parser.javacc.ParseException 3.95% 3 76
com.clickhouse.jdbc.internal.parser.javacc.ParseHandler 50.00% 2 4
com.clickhouse.jdbc.internal.parser.javacc.SimpleCharStream 30.00% 9 30
com.clickhouse.jdbc.internal.parser.javacc.StatementType 92.50% 37 40
com.clickhouse.jdbc.internal.parser.javacc.Token 66.67% 8 12
com.clickhouse.jdbc.internal.parser.javacc.TokenMgrException 0.00% 39
com.clickhouse.jdbc.internal.SqlParserFacade 94.44% 51 54
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4AndParamsParser 100.00% 18 18
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4AndParamsParser.ParseStatementAndParamsListener 92.86% 13 14
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4Parser 100.00% 49 49
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4Parser.ParsedPreparedStatementListener 98.25% 56 57
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4Parser.ParsedStatementListener 100.00% 15 15
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4Parser.ParserErrorListener 100.00% 2 2
com.clickhouse.jdbc.internal.SqlParserFacade.JavaCCParser 95.58% 108 113
com.clickhouse.jdbc.internal.SqlParserFacade.SQLParser 100.00% 4 4
com.clickhouse.jdbc.JdbcV2Wrapper 100.00% 4 4
com.clickhouse.jdbc.metadata.DatabaseMetaDataImpl 87.31% 516 591
com.clickhouse.jdbc.metadata.DatabaseMetaDataImpl.TableType 100.00% 14 14
com.clickhouse.jdbc.metadata.DatabaseMetaDataImpl.TypeLiteralInfo 100.00% 6 6
com.clickhouse.jdbc.metadata.ParameterMetaDataImpl 100.00% 23 23
com.clickhouse.jdbc.metadata.ResultSetMetaDataImpl 98.86% 87 88
com.clickhouse.jdbc.metadata.ResultSetMetaDataImpl.ColumnTypeBinding 100.00% 10 10
com.clickhouse.jdbc.metadata.ShowStatementsMetaData 92.59% 175 189
com.clickhouse.jdbc.PreparedStatementImpl 78.47% 390 497
com.clickhouse.jdbc.PreparedStatementImpl.ArrayProcessingCursor 100.00% 7 7
com.clickhouse.jdbc.ResultSetImpl 84.75% 539 636
com.clickhouse.jdbc.StatementImpl 94.43% 356 377
com.clickhouse.jdbc.types.Array 88.00% 44 50
com.clickhouse.jdbc.types.ArrayResultSet 51.85% 238 459
com.clickhouse.jdbc.types.Struct 100.00% 8 8
com.clickhouse.jdbc.WriterStatementImpl 41.98% 89 212

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

JDBC V1 Coverage

Coverage Report

Package Coverage Lines Covered Total Lines
com.clickhouse.jdbc 35.40% 947 2675
com.clickhouse.jdbc.internal 63.93% 1345 2104
com.clickhouse.jdbc.parser 69.59% 4598 6607
Class Coverage
Class Coverage Lines Covered Total Lines
com.clickhouse.jdbc.AbstractResultSet 1.33% 3 226
com.clickhouse.jdbc.ClickHouseArray 34.62% 9 26
com.clickhouse.jdbc.ClickHouseBlob 0.00% 12
com.clickhouse.jdbc.ClickHouseClob 0.00% 14
com.clickhouse.jdbc.ClickHouseConnection 52.78% 19 36
com.clickhouse.jdbc.ClickHouseDatabaseMetaData 47.31% 185 391
com.clickhouse.jdbc.ClickHouseDataSource 41.18% 7 17
com.clickhouse.jdbc.ClickHouseDriver 72.73% 40 55
com.clickhouse.jdbc.ClickHousePreparedStatement 16.67% 13 78
com.clickhouse.jdbc.ClickHouseResultSet 65.23% 167 256
com.clickhouse.jdbc.ClickHouseResultSetMetaData 34.21% 13 38
com.clickhouse.jdbc.ClickHouseScrollableResultSet 0.00% 17
com.clickhouse.jdbc.ClickHouseStatement 0.00% 1
com.clickhouse.jdbc.ClickHouseStruct 71.43% 5 7
com.clickhouse.jdbc.ClickHouseXml 0.00% 10
com.clickhouse.jdbc.CombinedResultSet 51.88% 83 160
com.clickhouse.jdbc.DataSourceV1 69.70% 23 33
com.clickhouse.jdbc.DriverV1 40.63% 39 96
com.clickhouse.jdbc.DriverV1.FrameworksDetection 90.91% 10 11
com.clickhouse.jdbc.internal.AbstractPreparedStatement 27.59% 16 58
com.clickhouse.jdbc.internal.ClickHouseConnectionImpl 68.97% 389 564
com.clickhouse.jdbc.internal.ClickHouseJdbcUrlParser 100.00% 29 29
com.clickhouse.jdbc.internal.ClickHouseJdbcUrlParser.ConnectionInfo 100.00% 18 18
com.clickhouse.jdbc.internal.ClickHouseParameterMetaData 70.37% 19 27
com.clickhouse.jdbc.internal.ClickHouseStatementImpl 61.87% 284 459
com.clickhouse.jdbc.internal.InputBasedPreparedStatement 71.76% 183 255
com.clickhouse.jdbc.internal.JdbcSavepoint 100.00% 14 14
com.clickhouse.jdbc.internal.JdbcTransaction 72.50% 58 80
com.clickhouse.jdbc.internal.SqlBasedPreparedStatement 66.86% 230 344
com.clickhouse.jdbc.internal.StreamBasedPreparedStatement 45.21% 66 146
com.clickhouse.jdbc.internal.TableBasedPreparedStatement 35.45% 39 110
com.clickhouse.jdbc.JdbcConfig 71.84% 74 103
com.clickhouse.jdbc.JdbcParameterizedQuery 70.00% 63 90
com.clickhouse.jdbc.JdbcParseHandler 95.12% 78 82
com.clickhouse.jdbc.JdbcTypeMapping 42.96% 61 142
com.clickhouse.jdbc.JdbcTypeMapping.AnsiTypeMapping 16.81% 20 119
com.clickhouse.jdbc.JdbcTypeMapping.InstanceHolder 100.00% 3 3
com.clickhouse.jdbc.JdbcWrapper 20.00% 1 5
com.clickhouse.jdbc.Main 0.00% 60
com.clickhouse.jdbc.Main.GenericQuery 0.00% 114
com.clickhouse.jdbc.Main.Int8Query 0.00% 59
com.clickhouse.jdbc.Main.MixedQuery 0.00% 89
com.clickhouse.jdbc.Main.Options 0.00% 124
com.clickhouse.jdbc.Main.Pojo 0.00% 25
com.clickhouse.jdbc.Main.StringQuery 0.00% 57
com.clickhouse.jdbc.Main.UInt64Query 0.00% 57
com.clickhouse.jdbc.parser.AbstractCharStream 44.44% 88 198
com.clickhouse.jdbc.parser.ClickHouseSqlParser 69.08% 2840 4111
com.clickhouse.jdbc.parser.ClickHouseSqlParserConstants 100.00% 1 1
com.clickhouse.jdbc.parser.ClickHouseSqlParserTokenManager 76.77% 1474 1920
com.clickhouse.jdbc.parser.ClickHouseSqlStatement 69.93% 100 143
com.clickhouse.jdbc.parser.ClickHouseSqlUtils 100.00% 28 28
com.clickhouse.jdbc.parser.LanguageType 100.00% 6 6
com.clickhouse.jdbc.parser.OperationType 100.00% 2 2
com.clickhouse.jdbc.parser.ParseException 3.95% 3 76
com.clickhouse.jdbc.parser.ParseHandler 75.00% 3 4
com.clickhouse.jdbc.parser.SimpleCharStream 30.00% 9 30
com.clickhouse.jdbc.parser.StatementType 97.30% 36 37
com.clickhouse.jdbc.parser.Token 66.67% 8 12
com.clickhouse.jdbc.parser.TokenMgrException 0.00% 39
com.clickhouse.jdbc.SqlExceptionUtils 50.00% 31 62

@github-actions

Copy link
Copy Markdown

Client V1 Coverage

Coverage Report

Package Coverage Lines Covered Total Lines
com.clickhouse.client 51.73% 2106 4071
com.clickhouse.client.config 76.14% 217 285
com.clickhouse.client.naming 86.96% 20 23
Class Coverage
Class Coverage Lines Covered Total Lines
com.clickhouse.client.AbstractClient 63.93% 78 122
com.clickhouse.client.AbstractSocketClient 3.13% 7 224
com.clickhouse.client.AbstractSocketClient.SocketRequest 0.00% 8
com.clickhouse.client.ClickHouseClient 6.16% 17 276
com.clickhouse.client.ClickHouseClientBuilder 68.67% 57 83
com.clickhouse.client.ClickHouseClientBuilder.Agent 19.05% 28 147
com.clickhouse.client.ClickHouseClientBuilder.DummyClient 53.85% 7 13
com.clickhouse.client.ClickHouseCluster 40.98% 25 61
com.clickhouse.client.ClickHouseConfig 80.93% 208 257
com.clickhouse.client.ClickHouseConfig.ClientOptions 66.67% 14 21
com.clickhouse.client.ClickHouseCredentials 60.00% 18 30
com.clickhouse.client.ClickHouseDnsResolver 44.44% 8 18
com.clickhouse.client.ClickHouseException 74.58% 44 59
com.clickhouse.client.ClickHouseLoadBalancingPolicy 67.06% 57 85
com.clickhouse.client.ClickHouseLoadBalancingPolicy.DefaultPolicy 100.00% 2 2
com.clickhouse.client.ClickHouseLoadBalancingPolicy.FirstAlivePolicy 95.24% 20 21
com.clickhouse.client.ClickHouseLoadBalancingPolicy.RandomPolicy 100.00% 6 6
com.clickhouse.client.ClickHouseLoadBalancingPolicy.RoundRobinPolicy 92.86% 13 14
com.clickhouse.client.ClickHouseNode 80.45% 284 353
com.clickhouse.client.ClickHouseNode.Builder 66.67% 68 102
com.clickhouse.client.ClickHouseNode.Status 100.00% 5 5
com.clickhouse.client.ClickHouseNodes 53.87% 202 375
com.clickhouse.client.ClickHouseNodeSelector 88.64% 78 88
com.clickhouse.client.ClickHouseParameterizedQuery 76.32% 174 228
com.clickhouse.client.ClickHouseParameterizedQuery.QueryPart 62.50% 15 24
com.clickhouse.client.ClickHouseProtocol 97.06% 33 34
com.clickhouse.client.ClickHouseRequest 55.74% 330 592
com.clickhouse.client.ClickHouseRequest.Mutation 83.33% 90 108
com.clickhouse.client.ClickHouseRequest.PipedWriter 100.00% 7 7
com.clickhouse.client.ClickHouseRequestManager 17.86% 5 28
com.clickhouse.client.ClickHouseRequestManager.InstanceHolder 100.00% 1 1
com.clickhouse.client.ClickHouseResponse 18.18% 2 11
com.clickhouse.client.ClickHouseResponse.new ClickHouseResponse() {...} 33.33% 3 9
com.clickhouse.client.ClickHouseResponseSummary 85.00% 51 60
com.clickhouse.client.ClickHouseResponseSummary.Progress 92.00% 23 25
com.clickhouse.client.ClickHouseResponseSummary.Statistics 64.71% 11 17
com.clickhouse.client.ClickHouseSimpleResponse 48.57% 34 70
com.clickhouse.client.ClickHouseSslContextProvider 90.91% 10 11
com.clickhouse.client.ClickHouseStreamResponse 0.00% 47
com.clickhouse.client.ClickHouseTransaction 0.00% 220
com.clickhouse.client.ClickHouseTransaction.XID 0.00% 35
com.clickhouse.client.ClickHouseTransactionException 0.00% 11
com.clickhouse.client.ClickHouseVersionUtils 44.65% 71 159
com.clickhouse.client.config.ClickHouseClientOption 89.61% 138 154
com.clickhouse.client.config.ClickHouseDefaults 94.44% 34 36
com.clickhouse.client.config.ClickHouseDefaultSslContextProvider 45.24% 38 84
com.clickhouse.client.config.ClickHouseDefaultSslContextProvider.NonValidatingTrustManager 0.00% 4
com.clickhouse.client.config.ClickHouseHealthCheckMethod 100.00% 3 3
com.clickhouse.client.config.ClickHouseProxyType 100.00% 2 2
com.clickhouse.client.config.ClickHouseSslMode 100.00% 2 2
com.clickhouse.client.naming.SrvResolver 86.96% 20 23
com.clickhouse.client.UnsupportedProtocolException 0.00% 4

- Document that the SHOW path returns rows in the JDBC order: the server
  sorts SHOW DATABASES / SHOW TABLES by name and DESCRIBE returns the
  columns in table order. Add a test for the order of getSchemas() with
  the flag on and off.
- Mark the two methods that build SHOW / DESCRIBE queries with
  @SuppressWarnings("squid:S2077"), as getColumns() does: the queries
  contain only values escaped by likeLiteral() and quoteIdentifier().
  Add parity cases with quotes in the patterns, including
  "%' OR '1'='1".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Triage

Category: feature • Risk: high

Summary
Implements #2907: DatabaseMetaData#getSchemas/getTables/getColumns in jdbc-v2 can now read metadata via SHOW DATABASES, SHOW FULL TABLES and DESCRIBE TABLE instead of system.* tables, so that tables hidden from the system tables by default (e.g. DataLakeCatalog/remote databases) are visible to JDBC tools. A new driver property jdbc_metadata_use_show_statements (default true) selects the implementation; the legacy system.* path is untouched and reachable with false. The bulk of the change is a new internal ShowStatementsMetaData class (~380 lines) that builds result sets client-side (new DetachedResultSet#createFromRecords), including client-side LIKE matching, identifier quoting, type-size computation, and per-object error skipping. Extensive parity tests compare the SHOW path against the system-table path row-for-row.

What this impacts

  • jdbc-v2 DatabaseMetaData — the primary metadata surface used by BI tools, IDEs, and ORMs.
  • New connection property jdbc_metadata_use_show_statements, enabled by default.
  • DriverProperties (new enum constant, appended), DetachedResultSet (new internal factory), docs/CHANGELOG.

Concerns

  • Default-on behavior change in a public API surface (High): getTables() now returns null in REMARKS (table comments) and TYPE_SCHEM by default — silently breaks consumers that read table comments. Also, databases/tables failing with ACCESS_DENIED etc. are now silently skipped rather than partially listed. The author themselves suggests this may belong under "Breaking Changes"; a reviewer should decide whether the flag should default to false initially.
  • Security-sensitive string construction (High rule: input validation/injection): database and table names are interpolated into SQL via a hand-rolled quoteIdentifier (backtick + \/` escaping) because SHOW … FROM / DESCRIBE only accept identifiers, and a custom LIKE→regex converter (likeMatcher) is built from user-supplied patterns. Tests cover odd names and an injection-style pattern, but this escaping logic needs careful human verification.
  • Large diff (High rule: >400 LOC): 732 additions across 9 files; the rubric requests a split, though the structure (one new class + seam + tests) is coherent.
  • Performance: getColumns() becomes N+1 — one DESCRIBE TABLE per matching table vs. a single system.columns query; wide patterns (getColumns(null, null, "%", null)) will fan out significantly. Acknowledged in docs but worth a reviewer judgment on the default.
  • CI checks (compile, JDBC integration vs 25.8/26.3/latest, SonarCloud) were still in progress at triage time.

Required reviewer action

  • At least one human reviewer.

@chernser chernser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new code is a massive change and later it will be very hard to maintain it. Thus we need to move new logic into smaller internal class, use aggregation in existing to create instance of new logic class and just call it. At the same time old implementation should be moved to separate private methods of existing class and it will be a nice fork

    public ResultSet getSchemas() throws SQLException {
              if (use_show_statements) {  
                     return sqlDataBaseMetadataImpl.getSchemas();
               } else { 
                      return getSchemasimpl();
                }
}

This might also help to reuse some code.

Another issue - you are using statements but must use prepared statements

Fix all this, please.

Move the SHOW DATABASES / SHOW TABLES / DESCRIBE TABLE logic out of
DatabaseMetaDataImpl into the internal class ShowStatementsMetaData.
DatabaseMetaDataImpl creates one instance and forks in getSchemas(),
getSchemas(String, String), getTables() and getColumns(): the flag
selects ShowStatementsMetaData or the unchanged system table query,
which is now in a private *Impl method.

The SHOW statements are prepared statements. The LIKE patterns are
parameters. The server accepts only an identifier after FROM and
DESCRIBE TABLE, so database and table names stay escaped identifiers.

Implements: #2907

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@polyglotAI-bot

Copy link
Copy Markdown
Collaborator Author

@chernser thank you for the review. I pushed f1a948e with these changes:

1. New logic in a separate internal class

  • The new package-private class ShowStatementsMetaData now contains all of the SHOW DATABASES / SHOW TABLES / DESCRIBE TABLE logic. DatabaseMetaDataImpl creates one instance of it in the constructor.
  • getSchemas(), getSchemas(String, String), getTables() and getColumns() now only fork on the flag, in the shape you gave:
    if (useShowStatements) {
        return showStatementsMetaData.getSchemas(null);
    } else {
        return getSchemasImpl();
    }
  • The old implementations moved to the private methods getSchemasImpl(), getSchemasImpl(String), getTablesImpl(...) and getColumnsImpl(...). Their bodies are the same as on main.
  • To reuse code, the new class calls TABLE_TYPE_MUTATOR, DATA_TYPE_VALUE_FUNCTION and prepareStatement(...) from DatabaseMetaDataImpl. These members are now package-private.
  • Net effect: the PR diff to DatabaseMetaDataImpl is now about 50 lines.

2. Prepared statements

  • All queries in the new class now use PreparedStatement. The LIKE patterns are parameters: SHOW DATABASES LIKE ?, SHOW FULL TABLES FROM <db> LIKE ? and SHOW FULL TEMPORARY TABLES LIKE ?.
  • There is one limit. The database name after FROM and the table name after DESCRIBE TABLE cannot be parameters, because the server accepts only an identifier in these positions. On 26.3, SHOW FULL TABLES FROM 'system' fails with Code: 62 … Expected identifier, and DESCRIBE TABLE 'system'.'one' also fails with a syntax error. The jdbc-v2 PreparedStatement binds a String as a literal. For this reason these names stay escaped identifiers: backticks, with \ and ` escaped. Please tell me if you want a different approach for these names.
  • The test table and column names now contain ?. This checks that a ? inside a quoted identifier is not taken as a parameter.

Tests: DatabaseMetaDataTest + DatabaseMetaDataWithEmptyFormatTest on CH 26.3: 130 run, 0 failures, 1 skipped (as before). ShowStatementsMetaDataLikeMatcherTest (renamed): 22 passed. StatementTest: 100 passed.

…a-show-statements

# Conflicts:
#	jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/DatabaseMetaDataImpl.java

@chernser chernser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good. But tests should be changed:

  • create ShowStatementDatabaseMetaDataTest that extends DatabaseMetadataTest but sets configuration flag to enable use of show statements medatata. The old tests should set flag to disable new show statement
  • move ‎jdbc-v2/src/test/java/com/clickhouse/jdbc/metadata/ShowStatementsMetaDataLikeMatcherTest.java‎ to that new tests classes and make it interact with database.

…class

DatabaseMetaDataTest now disables jdbc_metadata_use_show_statements, so it
covers the system table queries. ShowStatementDatabaseMetaDataTest extends it
and enables the flag, so the whole suite also runs on the SHOW/DESCRIBE path.
The show-vs-system parity, flag and readonly user tests move to the new
class. ShowStatementDatabaseMetaDataWithEmptyFormatTest runs the SHOW suite
with an empty format, the same as DatabaseMetaDataWithEmptyFormatTest does
for the system tables.

The LIKE matcher unit test becomes a database test: it checks each case with
the server's LIKE and through getColumns(). likeMatcher() is now private.
testGetColumnsOfTemporaryTable covers the schema patterns that select
temporary tables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@polyglotAI-bot

Copy link
Copy Markdown
Collaborator Author

@chernser Thank you. I changed the tests in 05ef73c:

  • DatabaseMetaDataTest sets jdbc_metadata_use_show_statements=false in getJdbcConnection(Properties), but only when a test does not set the flag itself. The suite now covers the system.* queries.
  • New ShowStatementDatabaseMetaDataTest extends DatabaseMetaDataTest sets the flag to true, so the whole suite also runs on the SHOW/DESCRIBE path. The show-vs-system parity test, the flag test (including the default value) and the readonly user test moved to this class.
  • ShowStatementsMetaDataLikeMatcherTest is removed. Its cases are now testGetColumnsMatchesColumnNamePatternLikeServer in the new class. For each case, the test creates a column with the case's name, checks the server result of SELECT ? LIKE ?, and calls getColumns() with the pattern. The 3 cases with an empty value cannot be column names. The branch they covered (temporary tables for an empty schema pattern) is now covered by testGetColumnsOfTemporaryTable, which is in the base class and runs in both modes. likeMatcher() is now private.
  • I also added ShowStatementDatabaseMetaDataWithEmptyFormatTest, so the SHOW path keeps the empty-format coverage that DatabaseMetaDataWithEmptyFormatTest gives the system path. If you do not want this class, I will remove it.

Mutation check: when the SHOW path is broken, only the new classes fail (inherited testGetSchemas / testGetTables, the LIKE cases, the temporary table cases).

Tests: the 4 metadata test classes, 290 run, 0 failures, 21 skipped (the empty-format skips), on ClickHouse 25.8 and 26.9.

@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

@chernser

chernser commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 05ef73c. Configure here.

@chernser
chernser merged commit f54019d into main Oct 1, 2026
21 of 24 checks passed
@chernser
chernser deleted the polyglot/jdbc-metadata-show-statements branch October 1, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[jdbc-v2] DataLakeCatalog is not present in getSchemas() result or avoid using system.* where possible.

3 participants