Skip to content

feat(client-v2, jdbc-v2): add QBit data type support - #2939

Merged
chernser merged 10 commits into
mainfrom
polyglot/client-v2-qbit
Jul 29, 2026
Merged

feat(client-v2, jdbc-v2): add QBit data type support#2939
chernser merged 10 commits into
mainfrom
polyglot/client-v2-qbit

Conversation

@polyglotAI-bot

@polyglotAI-bot polyglotAI-bot commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Description

Closes #2610.

Adds read/write support for the experimental QBit(element_type, dimension) vector data type (ClickHouse 25.10+) to client-v2 and jdbc-v2. QBit was previously only an unimplemented type constant (#2646), and every data-type test skipped it with // TODO: add support.

Supported element types: BFloat16, Float32, Float64 (the server rejects any other element type). The allow_experimental_qbit_type server setting is required only to create a QBit column — insert/select on an existing column do not need it.

Design

The key finding (verified byte-for-byte against a live ClickHouse 26.5 server): a QBit(element_type, dimension) value is transmitted over RowBinary exactly like Array(element_type) — a var-int length prefix followed by that many little-endian element values. The bit-transposed Tuple(FixedString(...)) layout referenced in the issue is a MergeTree on-disk storage detail, not the wire format; on the wire the server presents (and accepts) the logical vector as an array, and reports the column type string as QBit(Float32, 8).

So QBit is implemented as a one-level array of its element type, reusing the existing, well-tested array code paths, while keeping dataType == QBit for metadata fidelity:

  • Parser (clickhouse-data ClickHouseColumn): a QBit branch parses (element_type, dimension), builds the nested element column, sets arrayLevel = 1 / arrayBaseColumn, and keeps the dimension as the column precision.
  • Read (client-v2 BinaryStreamReader): case QBit reuses the Array read (readArray).
  • Write (client-v2 SerializerUtils): case QBit reuses serializeArrayData.
  • Java representation: float[] for BFloat16/Float32, double[] for Float64 — identical to Array(element_type), through generic records and POJO binding.
  • jdbc-v2: QBit maps to java.sql.Types.ARRAY; getObject/getArray return a java.sql.Array of the element type, and PreparedStatement binding renders it via the array-literal path (DataTypeConverter).

Entry points covered: client-v2 read + write (generic + POJO); jdbc-v2 read + write; the shared type parser.

Changes

  • clickhouse-data/.../ClickHouseColumn.javaKEYWORD_QBIT; QBit parse branch; QBit case in update().
  • client-v2/.../BinaryStreamReader.javacase QBit → array read.
  • client-v2/.../SerializerUtils.javacase QBit → array write.
  • client-v2/.../internal/DataTypeConverter.javacase QBit → array-literal rendering (JDBC/SQL param path).
  • jdbc-v2/.../internal/JdbcUtils.javaQBitJDBCType.ARRAY.
  • jdbc-v2/.../types/Array.java — resolve the array element column via getArrayNestedLevel() > 0 (was isArray(), which is false for QBit) so getBaseType()/getBaseTypeName() report the element type, not the whole QBit type.
  • docs/features.md, CHANGELOG.md — documentation.

Test

  • ClickHouseColumnTest (unit, @DataProvider): parsing QBit(E, N) for all three element types (dataType, element column, dimension) + a negative missing-dimension case.
  • DataTypeTests (client-v2 integration): full client write → server → read round-trip for Float32/Float64/BFloat16. The QBit column sits mid-schema with a trailing Int32 column, so a codec byte-misalignment would shift it and fail the assertion.
  • JdbcDataTypeTests (jdbc-v2 integration): PreparedStatement write + ResultSet read; asserts getColumnType == ARRAY, Array.getBaseType == FLOAT / getBaseTypeName == "Float32", and the element values.

Regression: full clickhouse-data unit suite (1660) and the existing Array integration tests in both modules pass unedited.

Notes

  • Not covered (intentional): QBit nested inside Variant/Dynamic — the server support there is experimental and the pre-existing tests already skip those combinations; left out of scope.
  • Writing null into a non-nullable QBit column throws a clear client-side error (rather than emitting an empty vector as Array does), which is intentional given QBit's fixed dimension — an empty vector is never valid.
  • No backport requested.

Pre-PR validation gate

  • Feature works via the real entry point (client write→server→read; JDBC PreparedStatement write + ResultSet read)
  • Public API fits sibling conventions (mirrors Array(element_type); QBitARRAY like Geometry/Point)
  • All applicable entry points + element types + edge cases covered
  • Tests pin intended behavior; no existing tests weakened
  • docs/features.md (client-v2 + jdbc-v2) and CHANGELOG.md updated
  • Convention compliance verified per AGENTS.md / docs/features.md / docs/changes_checklist.md

QBit(element_type, dimension) is transmitted over RowBinary exactly like
Array(element_type) - a var-int length followed by that many element values -
so it is read and written as a Java array of its element type (float[] for
BFloat16/Float32, double[] for Float64) reusing the existing array codec,
while keeping dataType == QBit for metadata fidelity. In jdbc-v2 QBit maps to
java.sql.Types.ARRAY and is exposed as a java.sql.Array. Element types:
BFloat16, Float32, Float64. The bit-transposed on-disk layout is a server
storage detail and is not exposed to the client.

Implements: #2610
@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown

Client V2 Coverage

Coverage Report

Package Coverage Lines Covered Total Lines
com.clickhouse.client.api 87.14% 1023 1174
com.clickhouse.client.api.command 43.33% 13 30
com.clickhouse.client.api.data_formats 64.80% 394 608
com.clickhouse.client.api.data_formats.internal 79.67% 1979 2484
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 85.90% 1359 1582
com.clickhouse.client.api.metadata 90.74% 49 54
com.clickhouse.client.api.metrics 93.75% 75 80
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 89.62% 423 472
com.clickhouse.client.api.Client.Builder 86.31% 208 241
com.clickhouse.client.api.Client.new DataStreamWriter() {...} 100.00% 8 8
com.clickhouse.client.api.ClientConfigProperties 94.03% 189 201
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% 7 7
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.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 75.54% 315 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 88.98% 436 490
com.clickhouse.client.api.data_formats.internal.BinaryStreamReader.ArrayValue 81.40% 35 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 58.97% 138 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 82.50% 33 40
com.clickhouse.client.api.data_formats.internal.SerializerUtils 87.89% 740 842
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 77.42% 48 62
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.70% 33 115
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.ClickHouseLZ4InputStream 89.33% 67 75
com.clickhouse.client.api.internal.ClickHouseLZ4OutputStream 92.31% 60 65
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.CompressedEntity 80.00% 28 35
com.clickhouse.client.api.internal.CredentialsManager 95.38% 62 65
com.clickhouse.client.api.internal.DataTypeConverter 90.91% 230 253
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 92.22% 474 514
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 91.67% 11 12
com.clickhouse.client.api.internal.HttpAPIClientHelper.TransportResponseImpl 81.25% 13 16
com.clickhouse.client.api.internal.LZ4Entity 82.93% 34 41
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.12% 16 17
com.clickhouse.client.api.metrics.ServerMetrics 100.00% 12 12
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 Jul 19, 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 79.88% 1628 2038
com.clickhouse.jdbc.internal 89.02% 1241 1394
com.clickhouse.jdbc.internal.parser.antlr4 40.80% 6372 15619
com.clickhouse.jdbc.internal.parser.javacc 71.83% 4803 6687
com.clickhouse.jdbc.metadata 87.15% 597 685
com.clickhouse.jdbc.types 55.23% 280 507
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 86.79% 243 280
com.clickhouse.jdbc.DataSourceImpl 96.15% 25 26
com.clickhouse.jdbc.Driver 79.17% 38 48
com.clickhouse.jdbc.Driver.FrameworksDetection 90.91% 10 11
com.clickhouse.jdbc.DriverProperties 93.55% 29 31
com.clickhouse.jdbc.internal.DetachedResultSet 80.39% 332 413
com.clickhouse.jdbc.internal.ExceptionUtils 69.57% 16 23
com.clickhouse.jdbc.internal.FeatureManager 100.00% 8 8
com.clickhouse.jdbc.internal.JdbcConfiguration 95.26% 201 211
com.clickhouse.jdbc.internal.JdbcUtils 90.07% 381 423
com.clickhouse.jdbc.internal.JdbcUtils.ArrayProcessingCursor 100.00% 11 11
com.clickhouse.jdbc.internal.ParsedPreparedStatement 96.08% 49 51
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.59% 4797 10522
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.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 62.50% 5 8
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 42.86% 6 14
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 53.33% 8 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.89% 6 318
com.clickhouse.jdbc.internal.parser.antlr4.ClickHouseParser.KeywordForAliasContext 2.33% 6 258
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 60.00% 6 10
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.86% 382 589
com.clickhouse.jdbc.internal.parser.javacc.AbstractCharStream 52.04% 102 196
com.clickhouse.jdbc.internal.parser.javacc.ClickHouseSqlParser 71.59% 2888 4034
com.clickhouse.jdbc.internal.parser.javacc.ClickHouseSqlParserConstants 100.00% 1 1
com.clickhouse.jdbc.internal.parser.javacc.ClickHouseSqlParserTokenManager 83.03% 1649 1986
com.clickhouse.jdbc.internal.parser.javacc.ClickHouseSqlStatement 36.05% 53 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 90.63% 29 32
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4AndParamsParser 90.91% 10 11
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4AndParamsParser.ParseStatementAndParamsListener 92.86% 13 14
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4Parser 97.30% 36 37
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4Parser.ParsedPreparedStatementListener 94.55% 52 55
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 98.53% 67 68
com.clickhouse.jdbc.internal.SqlParserFacade.SQLParser 100.00% 4 4
com.clickhouse.jdbc.JdbcV2Wrapper 100.00% 4 4
com.clickhouse.jdbc.metadata.DatabaseMetaDataImpl 84.15% 462 549
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.80% 82 83
com.clickhouse.jdbc.metadata.ResultSetMetaDataImpl.ColumnTypeBinding 100.00% 10 10
com.clickhouse.jdbc.PreparedStatementImpl 77.76% 381 490
com.clickhouse.jdbc.PreparedStatementImpl.ArrayProcessingCursor 100.00% 7 7
com.clickhouse.jdbc.ResultSetImpl 84.75% 539 636
com.clickhouse.jdbc.StatementImpl 94.01% 267 284
com.clickhouse.jdbc.types.Array 88.00% 44 50
com.clickhouse.jdbc.types.ArrayResultSet 50.78% 228 449
com.clickhouse.jdbc.types.Struct 100.00% 8 8
com.clickhouse.jdbc.WriterStatementImpl 34.93% 73 209

@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown

JDBC V1 Coverage

Coverage Report

Package Coverage Lines Covered Total Lines
com.clickhouse.jdbc 35.29% 944 2675
com.clickhouse.jdbc.internal 63.53% 1336 2103
com.clickhouse.jdbc.parser 69.35% 4556 6570
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 64.84% 166 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 66.61% 375 563
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.66% 283 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 68.60% 236 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 67.78% 61 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 68.85% 2816 4090
com.clickhouse.jdbc.parser.ClickHouseSqlParserConstants 100.00% 1 1
com.clickhouse.jdbc.parser.ClickHouseSqlParserTokenManager 76.47% 1456 1904
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.66% 2097 4059
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 41.67% 5 12
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.84% 330 591
com.clickhouse.client.ClickHouseRequest.Mutation 83.33% 90 108
com.clickhouse.client.ClickHouseRequest.PipedWriter 100.00% 7 7
com.clickhouse.client.ClickHouseRequestManager 0.00% 22
com.clickhouse.client.ClickHouseRequestManager.InstanceHolder 0.00% 2
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

QBit(element_type, dimension) is a fixed-size vector: the server requires
exactly `dimension` elements and rejects any other length over RowBinary with
a late SERIALIZATION_ERROR (verified against server 26.5). The write path
reused serializeArrayData, which wrote the actual array/list length without
checking it, so a wrong-sized (including empty) vector was serialized like a
normal Array and only failed on the server after a round-trip.

Split the QBit case out of the Array fall-through into serializeQBitData, which
validates the element count against column.getPrecision() (the dimension) and
throws a clear IllegalArgumentException naming the column, expected dimension,
and actual length before delegating to serializeArrayData. This mirrors the
client-side length enforcement already applied to the other fixed-size type,
FixedString(N). A correctly-sized QBit is still byte-for-byte identical to
Array(element_type).

Addresses Cursor Bugbot review on PR #2939.
@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown

Triage

Category: featureRisk: high

Summary
This PR adds full read/write support for the experimental QBit(element_type, dimension[, stride]) vector data type (ClickHouse 25.10+) across clickhouse-data, client-v2, and jdbc-v2. The key design insight — verified against a live server — is that over RowBinary a QBit value is wire-identical to Array(element_type) (a var-int length prefix followed by element values), so the implementation delegates to the existing array code paths but routes through a dedicated QBit branch to keep the type distinction explicit. The type parser in ClickHouseColumn builds the nested element column and sets arrayLevel = 1 / arrayBaseColumn for QBit. The NativeFormatReader fast-fails on any QBit column (including nested ones) with a clear error because the Native format uses a different bit-transposed layout. In jdbc-v2, QBit maps to JDBCType.ARRAY and is returned as java.sql.Array. Comprehensive unit and integration tests cover all three element types (BFloat16, Float32, Float64), dimension validation on both read and write, null guards, Dynamic/Variant nested decoding, and the Native-format rejection path.

What this impacts

  • com.clickhouse.data.ClickHouseColumn — type parser and update() dispatch table
  • client-v2 readers: BinaryStreamReader (RowBinary read path) and NativeFormatReader (fast-fail guard)
  • client-v2 writers: SerializerUtils (serialize + Dynamic type-tag paths) and DataTypeConverter (SQL text rendering)
  • jdbc-v2: JdbcUtils type map and Array element-column resolution
  • Public-facing: new JDBC type mapping, new POJO field type (float[]/double[]), new element type names in metadata

Concerns

  • High — Type system: ClickHouseColumn.java is in com.clickhouse.data, a High-risk package per repo rules.
  • High — Readers and Writers: BinaryStreamReader.java and SerializerUtils.java in client-v2 are modified — both are on the High-risk list.
  • High — Cross-module: PR touches clickhouse-data/, client-v2/, and jdbc-v2/ (three or more modules).
  • High — Large diff: 644 additions exceed the 400-line threshold.
  • The containsQBit helper in NativeFormatReader is recursive over the nested column tree; for pathological deeply-nested schemas this is unbounded recursion, though in practice ClickHouse column nesting is shallow.
  • The readDynamicData QBit branch consumes the element-type encoding and a readVarInt dimension inline; a partial read here (e.g. on a corrupt stream) could desync the remaining block — worth a reviewer eye on error handling.

Required reviewer action

  • At least one human reviewer required.

A non-null QBit value that is neither a Java array nor a List fell through
serializeQBitData to serializeArrayData, which writes no bytes for such a
value, desynchronizing the RowBinary stream so the following columns are
misread or rejected by the server. Reject it up-front with a clear
IllegalArgumentException, consistent with the existing fixed-dimension
validation and the Geometry reject-unsupported path.

Addresses Cursor Bugbot review on #2939.
@mshustov

Copy link
Copy Markdown
Member

@cursor review

Copilot AI 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.

Pull request overview

Adds end-to-end support for ClickHouse’s experimental QBit(element_type, dimension) vector type across the shared type parser (clickhouse-data), the client-v2 RowBinary reader/writer, and jdbc-v2 type mapping and array handling, with integration/unit test coverage and documentation updates.

Changes:

  • Parse QBit(E, N) in clickhouse-data as a one-level “array-like” type (nested element column + dimension retained as precision).
  • Reuse existing Array(element_type) RowBinary read/write paths for QBit in client-v2, including parameter string rendering as an array literal.
  • Expose QBit as Types.ARRAY in jdbc-v2 and ensure JDBC Array metadata reports the element type (not the full QBit(...) type).

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
jdbc-v2/src/test/java/com/clickhouse/jdbc/JdbcDataTypeTests.java Adds JDBC integration test for QBit mapping, PreparedStatement write, and ResultSet read/metadata.
jdbc-v2/src/main/java/com/clickhouse/jdbc/types/Array.java Treats QBit as array-nested for base type/name reporting via getArrayNestedLevel().
jdbc-v2/src/main/java/com/clickhouse/jdbc/internal/JdbcUtils.java Maps ClickHouseDataType.QBit to JDBCType.ARRAY.
docs/features.md Documents QBit wire contract/behavior and JDBC mapping expectations.
client-v2/src/test/java/com/clickhouse/client/datatypes/DataTypeTests.java Adds client-v2 integration round-trip tests for QBit with Float32/Float64/BFloat16, plus DDL settings support in helper.
client-v2/src/test/java/com/clickhouse/client/api/data_formats/internal/SerializerUtilsTest.java Adds serializer-level validation tests for QBit dimension and input type.
client-v2/src/main/java/com/clickhouse/client/api/internal/DataTypeConverter.java Renders QBit parameters as array literals by reusing the Array path.
client-v2/src/main/java/com/clickhouse/client/api/data_formats/internal/SerializerUtils.java Adds QBit serialization that validates fixed dimension and type, then delegates to array serialization.
client-v2/src/main/java/com/clickhouse/client/api/data_formats/internal/BinaryStreamReader.java Reads QBit by reusing Array decoding.
clickhouse-data/src/test/java/com/clickhouse/data/ClickHouseColumnTest.java Adds unit tests for QBit parsing (element type + dimension) and missing-dimension failure case.
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseColumn.java Adds QBit keyword parsing, nested element column setup, and dimension retention in precision.
CHANGELOG.md Adds release note entry for QBit support and behavior.

Comment thread client-v2/src/test/java/com/clickhouse/client/datatypes/DataTypeTests.java Outdated
…eject null QBit, await DDL in test

Review response on PR #2939:

- NativeFormatReader: reject reading any column that is or contains a QBit
  (recursive check). The server transmits QBit in the Native format using its
  internal bit-transposed Tuple(FixedString(...)) layout, not the Array-like
  RowBinary representation this reader decodes, so the previous fall-through
  misread the bytes and desynchronized the block. Fail loud with a clear
  ClientException pointing to a RowBinary format instead of decoding garbage.
- SerializerUtils.serializeQBitData: reject a null value. A fixed-dimension QBit
  cannot be null; a QBit nested in a container (Tuple/Map/Array) reaches this
  path via serializeNestedData without the top-level preamble, so without the
  guard the null was written as a zero-length vector, desynchronizing the stream.
- DataTypeTests.writeReadVerify: await client.execute(tableDef) in the no-ddl
  branch (it was unawaited, racing the subsequent getTableSchema).
- Tests: Native rejection (top-level + nested Map(String,QBit)); null QBit
  rejection (direct + nested-in-Tuple). docs/features.md + CHANGELOG updated.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mshustov
mshustov requested a review from Copilot July 24, 2026 12:29
@mshustov

Copy link
Copy Markdown
Member

@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 557768b. Configure here.

Copilot AI 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.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

client-v2/src/main/java/com/clickhouse/client/api/data_formats/NativeFormatReader.java:116

  • In NativeFormatReader's Array handling, the per-row offsets are read into sizes, but readArrayItem(...) is always invoked with sizes[0]. This makes every row read the same element count and can desynchronize the Native stream for multi-row results. In ClickHouse Native format, Array columns store cumulative offsets, so the per-row length should be computed as a difference between successive offsets.
            if (column.isArray()) {
                int[] sizes = new int[nRows];
                for (int j = 0; j < nRows; j++) {
                    sizes[j] = Math.toIntExact(binaryStreamReader.readLongLE());
                }
                for (int j = 0; j < nRows; j++) {
                    values.add(binaryStreamReader.readArrayItem(column.getNestedColumns().get(0), sizes[0]));

@polyglotAI-bot

Copy link
Copy Markdown
Collaborator Author

Thanks @mshustov for the re-review. Addressing the one low-confidence item Copilot surfaced (suppressed) on NativeFormatReader.java:116.

Verdict: it's a genuine bug, but it is pre-existing and unrelated to this QBit PR — so I'm scoping it out of this PR and tracking it for a separate fix.

Not introduced here. git blame puts line 116 and the whole if (column.isArray()) block at commit a07534070 (2024-12-03) — it long predates this PR. This PR's only change to NativeFormatReader is the up-front containsQBit(...) reject added before the isArray() block (plus its helper). A QBit column throws there and never reaches line 116, and QBit values are read via the RowBinary path (BinaryStreamReader.readArray, per-row readVarInt length) rather than this Native columnar path — so QBit is unaffected either way.

The concern is real for multi-row Array results with non-uniform row lengths. In the Native format an Array(T) column writes cumulative offsets followed by the flattened elements. Verified against ClickHouse 26.5 — SELECT arr … FORMAT Native for rows [10], [20,21], [30,31,32]:

offsets (3×UInt64 LE): 01.. 03.. 06..                    -> [1, 3, 6]   (cumulative, not [1,2,3])
data    (6×Int32  LE): 0a.. 14.. 15.. 1e.. 1f.. 20..     -> 10,20,21,30,31,32

Line 116 calls readArrayItem(nested, sizes[0]) for every row, so with sizes[0] == 1 it reads: row 0 → [10] ✓, row 1 → [20] ✗ (should be [20,21]), row 2 → [21] ✗ (should be [30,31,32]), and leaves 30,31,32 unread, desynchronizing any column that follows. It is accidentally correct when every row shares row 0's length (which is why single-row / uniform-length tests don't catch it).

Suggested fix (per-row length = successive-offset difference):

for (int j = 0; j < nRows; j++) {
    int len = sizes[j] - (j == 0 ? 0 : sizes[j - 1]);
    values.add(binaryStreamReader.readArrayItem(column.getNestedColumns().get(0), len));
}

Since this is independent of the QBit feature and lives in the general Array read path, I'm keeping this PR focused on QBit (one concern per PR) and will handle the NativeFormatReader cumulative-offset fix plus a multi-row / non-uniform-length regression test separately. Happy to open that follow-up.

Comment thread clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseColumn.java Outdated
Comment thread clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseColumn.java Outdated
Comment thread client-v2/src/main/java/com/clickhouse/client/api/internal/DataTypeConverter.java Outdated
Comment thread jdbc-v2/src/test/java/com/clickhouse/jdbc/JdbcDataTypeTests.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.

  • use dedicated method to handle QBit.
  • do more effort to support native format
  • do more effort in handling QBit with strides as it get virtual columns.

…-type parsing, dedicated methods, Dynamic decode

Addresses @chernser's review round on PR #2939:
- ClickHouseColumn: accept QBit(element_type, dimension[, stride]) (two or three
  parameters); warn instead of rejecting when the element type is outside the
  documented {Int8, BFloat16, Float32, Float64} set, so a newer server-side element
  type keeps parsing without a client change.
- BinaryStreamReader: dedicated readQBit method (QBit no longer folded into the Array
  switch case); readDynamicData now decodes a QBit nested in a Dynamic/Variant/JSON
  column (0x36 <element_type> <dimension>) instead of desynchronizing the stream.
- DataTypeConverter: dedicated qbitToString method.
- Tests: broaden ClickHouseColumnTest parser cases (Int8, larger dimensions, the
  stride form, a >3-parameter rejection, and an undocumented-element-type-parses case)
  and add a QBit-in-Dynamic round-trip integration test with a trailing-column desync
  guard.
- docs/features.md + CHANGELOG updated.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…Bit read dimension

Addresses the Cursor Bugbot review round on PR #2939:
- writeDynamicTypeTag rejects QBit explicitly (ClientException) instead of falling
  through to the default branch and emitting a bare 0x36 tag, while readDynamicData
  expects 0x36 <element_type> <var_uint dimension>. The client never infers a QBit from
  a Java value (valueToColumnForDynamicType only yields Array/Map/scalar), so this write
  path is unreachable via the public API; failing loud removes the write/read asymmetry
  rather than silently mis-encoding. Reading a server-sent QBit inside a Dynamic column
  remains supported.
- readQBit validates the on-wire element count against the declared dimension (symmetric
  with the write-side serializeQBitData check), surfacing a corrupt count as a clear
  error instead of a wrong-length vector. The read itself cannot misalign the stream:
  readArray consumes exactly the length-prefixed count.
- Tests: testDynamicTypeTagRejectsQBit + testQBitReadRejectsWrongDimension.
- docs/features.md: Dynamic QBit is read-only (write rejected); document the read-side
  dimension validation.

The 0x37 strided-QBit Dynamic tag is deliberately not decoded: server 26.5.1 rejects
3-parameter QBit so the wire form is unverifiable, and an unknown tag already fails loud
in readDynamicData. Left for the pending strides scope decision.

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

Copy link
Copy Markdown
Collaborator Author

CI note — the client-v2 + CH 25.8 red (DataTypeTests.testDynamicWithPrimitivesArithmeticException: Rounding necessary) is a pre-existing flake, not caused by this PR.

Diagnosis:

  • The failing assertion is the Decimal round-trip in testDynamicWithPrimitives (row.getBigDecimal(...).stripTrailingZeros().divide(value, RoundingMode.UNNECESSARY)). That test explicitly skips QBit (case QBit: continue;), and this PR's diff only touches QBit code paths — none of it executes on the failing Decimal path.
  • Root cause is pre-existing test data: DataTypesTestingPOJO uses a seed-less new Random() and sets decimalNN = BigDecimal.valueOf(random.nextDouble()). Round-tripping such a random value through a Dynamic column (stored at the inferred DecimalXX(maxScale)) and comparing with RoundingMode.UNNECESSARY throws Rounding necessary for magnitudes whose precision doesn't round-trip exactly — a non-deterministic, per-run outcome.
  • Reproduction: testDynamicWithPrimitives passes against clickhouse/clickhouse-server:25.8 both on this PR's head and on plain main in my environment; the CI failure did not reproduce, consistent with a random-value flake. It also passed on CH 26.3 / latest / every clickhouse-http-client job in the same CI run.

I have not modified the test (it is pre-existing and unrelated to QBit); flagging it separately as a test-flakiness follow-up. The latest review-response push re-triggers CI.

The QBit -> SQL text path (DataTypeConverter.convertToString QBit case ->
qbitToString) was exercised only by the version-gated QBit integration
tests, which the SonarCloud coverage job (ClickHouse 25.3, below QBit's
25.10 minimum) skips -- leaving those lines uncovered on new code. Add a
unit test asserting the array-literal rendering for Float32/Float64 QBit
columns so the codec path is covered independently of the server version.
@polyglotAI-bot

Copy link
Copy Markdown
Collaborator Author

CI fix — SonarCloud "Coverage on New Code" (18.7%)

The failing SonarCloud Quality Gate was not an actual gap in the QBit code. Root cause:

  • In the coverage job (analysis.yml, mvn -Pcoverage verify on ClickHouse 25.3), the client-v2 integration-test phase failed on com.clickhouse.client.metrics.MetricsTest.testRegisterMetrics — an unrelated metrics test. That aborted client-v2's jacoco-report-aggregate, so SonarCloud imported 0% coverage for the entire client-v2 module (every client-v2 file, including unit-tested ones, showed 0%), dragging new-code coverage to 18.7%.
  • testRegisterMetrics asserted a query completes in < 15 ms — unreliable under the JaCoCo agent's instrumentation overhead. main already replaced it with a deterministic CountDownLatch version (commit 80ef37d9). This branch was 82 commits behind main and still carried the flaky version; the stale base was also inflating "new code" with unrelated drift from files this PR never touches.

Fix (no change to QBit production behavior):

  1. Merged current main — picks up the already-fixed MetricsTest (so the coverage aggregate generates) and refreshes the new-code baseline to the PR's actual QBit diff.
  2. Added a small unit test (DataTypeConverterTest#testQBitToString) for the QBit → SQL-text path, which was previously covered only by the version-gated integration tests that the coverage job's CH 25.3 skips (QBit needs 25.10+).

Verified locally: client-v2 QBit new-code lines are now fully unit-covered; MetricsTest#testRegisterMetrics and the QBit unit + integration tests all pass on the merged branch.

@chernser

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 df12232. Configure here.

chernser and others added 2 commits July 29, 2026 09:10
…sTest

The "Merge branch 'main'" commit (887c3a7) dropped the closing brace of
testQBitReadRejectsWrongDimension() at the seam where main's
dynamicDecimalTypeInference @dataProvider was interleaved, leaving the method
body unterminated. That broke the JDK 8 compile of the client-v2 test sources
(cascading ';' expected / not a statement / illegal start of expression). No
production code is affected — restore the single closing brace.

Verified: client-v2 + jdbc-v2 test sources compile; SerializerUtilsTest 96/96 green.
@sonarqubecloud

Copy link
Copy Markdown

@chernser
chernser merged commit 6e8d48e into main Jul 29, 2026
21 of 24 checks passed
@chernser
chernser deleted the polyglot/client-v2-qbit branch July 29, 2026 17:26
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.

Support QBit data type (25.10)

4 participants