Skip to content

feat(client-v2): add span recorder SPI for operation and request tracing - #2988

Merged
chernser merged 9 commits into
mainfrom
polyglot/client-v2-observability-span-spi
Aug 18, 2026
Merged

feat(client-v2): add span recorder SPI for operation and request tracing#2988
chernser merged 9 commits into
mainfrom
polyglot/client-v2-observability-span-spi

Conversation

@polyglotAI-bot

Copy link
Copy Markdown
Collaborator

Description

Implements #2974PR 1 of 2 (SPI + client-v2 instrumentation, no OpenTelemetry dependency), per the plan agreed in this comment and @chernser's approval ("This is good spec and lets implement in two PRs as proposed"). PR 2 will add the OpenTelemetry recorder as a separate Maven module.

Adds a backend-agnostic observability SPI so an application can observe every client operation and every transport request as spans. Nothing is recorded and no span-related work is done unless a recorder is registered.

All three spec corrections from the review are applied:

  • class SpanAttributesenum SpanAttribute;
  • startSpan is overloaded on QuerySettings / InsertSettings — the recorder gets the resolved settings object instead of a long argument list and takes what it needs from it;
  • SpanRecorder and Span are interfaces whose methods all have no-op defaults, plus SpanRecorder.NOOP / Span.NOOP, so there are no null checks and a partial implementation is safe.

Design

New public package com.clickhouse.client.api.observability:

public interface SpanRecorder {
    SpanRecorder NOOP = new SpanRecorder() {};
    default Span startSpan(String spanName, QuerySettings settings) { return Span.NOOP; }
    default Span startSpan(String spanName, InsertSettings settings) { return Span.NOOP; }
    default Span startRequestSpan(String spanName, Span operationSpan) { return Span.NOOP; }
}

public interface Span {
    Span NOOP = new Span() {};
    default void setAttribute(String key, Object value) {}   // keys from SpanAttribute
    default void setError(String errorType) {}               // records error.type + marks failed
    default void end() {}                                    // called exactly once
}

public enum SpanAttribute { DB_SYSTEM_NAME("db.system.name"), ... }   // key registry

Entry point: Client.Builder.setSpanRecorder(SpanRecorder) (unset/null ⇒ record nothing).

  • Nesting / threading: one operation span per query/execute/insert/ping/getTableSchema, started on the calling thread so it joins the caller's ambient trace even when async_operations runs the operation on the client's executor; each transport attempt — including every retry — starts a child request span via startRequestSpan(name, operationSpan). No OpenTelemetry type appears in any signature.
  • One attribute method (setAttribute(String, Object)) rather than a SpanAttribute overload, so an implementation cannot silently drop values (e.g. db.query.parameter.<key>) by overriding only one overload.
  • Values are computed by the client in internal SpanSupport, with the keys defined by SpanAttribute — so every recorder reports identical information; a recorder only maps them to its backend.
  • Span names follow the OTel DB/HTTP-client conventions: <operation> <namespace>[.<table>] for an operation (e.g. query default, insert default.events) and POST for a request span (all client requests are HTTP POSTs, so the name is known at creation and no updateName hook is needed).
  • Attributes per the issue table: db.system.name, db.namespace, clickhouse.query_id, db.query.text (query/command only), db.query.parameter.<name>, db.operation.name (insert/ping/getTableSchema), db.collection.name (insert/getTableSchema), db.operation.batch.size (POJO insert), server.address/server.port (on the operation span when the client has a single endpoint, and per attempt on each request span), db.response.returned_rows on success, error.type + db.response.status_code on failure, plus http.request.method / http.response.status_code on request spans.
  • Recording wraps HttpAPIClientHelper.executeRequest(TransportRequest) rather than replacing it, so that method remains the single place a request is executed (and existing overrides of it still bind).

Compatibility: purely additive — new package, one new builder method, one new executeRequest(TransportRequest, Span) overload and one new HttpAPIClientHelper constructor (the existing 1-arg/4-arg forms are kept and still used). No existing signature, default or behaviour changed; the default (no recorder) path is unchanged. Java 8 compatible. No new runtime dependency.

Changes

  • client-v2/.../api/observability/{SpanRecorder,Span,SpanAttribute}.java — the SPI (new).
  • client-v2/.../api/internal/SpanSupport.java — starts spans and computes all attribute values; every method short-circuits on SpanRecorder.NOOP/Span.NOOP (new).
  • client-v2/.../api/Client.javaBuilder.setSpanRecorder(...); operation spans on the query/command path (queryImpl, which ping and getTableSchema now call with their own operation name/target so one span describes the operation the application actually called), the POJO insert path and the stream/writer insert path; spans started on the calling thread and ended exactly once, also on failure.
  • client-v2/.../api/internal/HttpAPIClientHelper.java — per-attempt request span around request execution, with HTTP status and failure recording.
  • CHANGELOG.md, docs/features.md.

Size note (AGENTS.md scope discipline): ~750 LOC of production code (517 new + 241 modified) in one module, which is the first of the two slices agreed on the issue.

Test

New tests only; no existing test edited or weakened.

  • SpanRecorderUnitTest (11 cases, WireMock/dead endpoint): statement text + db.query.parameter.* + query id + endpoint + HTTP status on a successful query; POJO insert reports db.operation.batch.size, stream insert does not; one request span per attempt via @DataProvider (0/1/3 retries ⇒ 1/2/4 request spans), each a child of the one operation span, each ended exactly once, all carrying error.type; per-attempt server.address/server.port on failover (and no endpoint on the operation span when several are configured); insert failure records the error on the operation and every request span; useAsyncRequests(true) starts the operation span on the caller's thread while the request runs on the executor; setSpanRecorder(null) records nothing; the SPI default methods return NOOP.
  • SpanRecorderTest (6 integration cases, real server): db.response.returned_rows and the server-assigned query id; a server error records error.type=…ServerException, db.response.status_code=60 and the HTTP status on both the operation and the request span; ping, getTableSchema, getTableSchemaFromQuery and a command each produce the expected span name/attributes (including a contrast assertion that a named operation reports no db.query.text).
  • Suite: mvn -pl client-v2 test540 passed; mvn -pl client-v2 -DskipUTs=true -Dit.test=SpanRecorderTest,QueryTests,InsertTests,CommandTests,MetadataTests verify147 passed; mvn -pl jdbc-v2,packages/clickhouse-jdbc-all -am -DskipTests install → OK.

Docs / surface

  • CHANGELOG.md: entry under 0.11.0-rc1 → New Features, tagged **[client-v2]**, with the issue link.
  • docs/features.md: new client-v2 bullet describing the SPI, the span shape, every attribute, the span lifetime and the zero-overhead default.
  • No version bump (additive feature inside the in-progress 0.11.0-rc1). No backport needed.

docs/changes_checklist.md walk-through

  • New method added (Builder.setSpanRecorder, executeRequest(TransportRequest, Span), new HttpAPIClientHelper ctor): names/params follow the module's existing builder and helper patterns (setSSLContext, registerClientMetrics); nullability is explicit (null recorder ⇒ record nothing); behaviour-focused tests added; docs/features.md updated as the checklist requires for a user-visible client-v2 feature. Interface additions carry defaults, so implementors stay source- and binary-compatible.
  • Enum constant added (SpanAttribute): brand-new enum, keys unique and not used for parsing, serialization or persisted values.
  • Exception handling changed: no exception is swallowed or retyped — recording happens in catch blocks that rethrow the original exception, and retry classification (shouldRetry) is untouched.
  • Conditional logic / guard changed: the added guards are NOOP reference comparisons and null/port > 0 checks before recording an attribute; the retry loops' control flow is unchanged (verified by the retry-count tests and the untouched failover/insert suites).
  • Logging: none added.

Pre-PR validation gate

  • Works via the real entry point (integration tests exercise query, command, insert, ping and schema paths against a live server)
  • Public API fits sibling conventions; surface no wider than needed
  • All applicable entry points + edge cases covered (query/command, both insert paths, ping, schema, retries, failover, failure, async, null recorder)
  • Tests pin intended behaviour; contrast cases included; no existing tests weakened
  • docs/features.md + CHANGELOG.md updated
  • Convention compliance verified per AGENTS.md, docs/ai-review.md and docs/changes_checklist.md

Follow-ups

  1. PR 2 — OpenTelemetry recorder module (OTel API compile-only, aggregator + clickhouse-jdbc-all wiring, in-memory-exporter tests).
  2. jdbc-v2 surfacing: jdbc-v2 builds its Client from string properties, so injecting a recorder instance needs its own small decision — a spanRecorder driver property naming a class to instantiate, or a setter on DataSourceImpl. Happy to add whichever you prefer in a follow-up; @chernser, which would you like?

Adds a backend-agnostic observability SPI so an application can observe
every client operation and every transport request as spans:

- new public package com.clickhouse.client.api.observability with
  SpanRecorder, Span (both interfaces with no-op defaults and NOOP
  constants) and the SpanAttribute enum holding the attribute keys;
- Client.Builder.setSpanRecorder(SpanRecorder) as the entry point; when
  unset (or null) nothing is recorded and no span work is done;
- one operation span per query, command, insert, ping and getTableSchema,
  started on the calling thread so it joins the caller's ambient trace,
  and one child request span per transport attempt including retries.

Attribute values are computed by the client (internal SpanSupport), so
every recorder reports the same information. An OpenTelemetry
implementation of the SPI follows in a separate module.

Implements: #2974
Comment thread client-v2/src/main/java/com/clickhouse/client/api/Client.java
Comment thread client-v2/src/main/java/com/clickhouse/client/api/Client.java Outdated
Comment thread client-v2/src/main/java/com/clickhouse/client/api/Client.java Outdated
Comment thread client-v2/src/main/java/com/clickhouse/client/api/internal/SpanSupport.java Outdated
Comment thread client-v2/src/main/java/com/clickhouse/client/api/Client.java Outdated
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

Client V2 Coverage

Coverage Report

Package Coverage Lines Covered Total Lines
com.clickhouse.client.api 87.63% 1056 1205
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.94% 1996 2497
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.43% 1389 1607
com.clickhouse.client.api.metadata 90.74% 49 54
com.clickhouse.client.api.metrics 93.75% 75 80
com.clickhouse.client.api.observability 94.69% 107 113
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 90.60% 453 500
com.clickhouse.client.api.Client.Builder 86.48% 211 244
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 85.71% 36 42
com.clickhouse.client.api.data_formats.internal.SerializerUtils 88.39% 754 853
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.19% 66 74
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.98% 232 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.31% 502 538
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.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.observability.DefaultSpanRecorder 100.00% 11 11
com.clickhouse.client.api.observability.DefaultSpanRecorder.NoopSpan 75.00% 3 4
com.clickhouse.client.api.observability.SpanAttribute 100.00% 21 21
com.clickhouse.client.api.observability.SpanSupport 93.51% 72 77
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 31, 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 80.56% 1695 2104
com.clickhouse.jdbc.internal 89.01% 1239 1392
com.clickhouse.jdbc.internal.parser.antlr4 40.80% 6372 15619
com.clickhouse.jdbc.internal.parser.javacc 71.83% 4804 6688
com.clickhouse.jdbc.metadata 88.61% 607 685
com.clickhouse.jdbc.types 56.01% 289 516
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 78.26% 36 46
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 66.67% 14 21
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.60% 2889 4035
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 85.97% 472 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.71% 380 489
com.clickhouse.jdbc.PreparedStatementImpl.ArrayProcessingCursor 100.00% 7 7
com.clickhouse.jdbc.ResultSetImpl 84.75% 539 636
com.clickhouse.jdbc.StatementImpl 94.86% 332 350
com.clickhouse.jdbc.types.Array 88.00% 44 50
com.clickhouse.jdbc.types.ArrayResultSet 51.75% 237 458
com.clickhouse.jdbc.types.Struct 100.00% 8 8
com.clickhouse.jdbc.WriterStatementImpl 36.79% 78 212

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

JDBC V1 Coverage

Coverage Report

Package Coverage Lines Covered Total Lines
com.clickhouse.jdbc 35.33% 945 2675
com.clickhouse.jdbc.internal 63.24% 1330 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 47.06% 8 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 65.54% 369 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

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

Client V1 Coverage

Coverage Report

Package Coverage Lines Covered Total Lines
com.clickhouse.client 51.74% 2106 4070
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.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 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

Comment thread client-v2/src/main/java/com/clickhouse/client/api/Client.java
Comment thread client-v2/src/main/java/com/clickhouse/client/api/Client.java Outdated
Comment thread client-v2/src/main/java/com/clickhouse/client/api/Client.java Outdated

@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.

see comments.

Applies the review requests on the observability SPI:

- Span and SpanRecorder are plain interfaces without default methods; the
  new public DefaultSpanRecorder class implements them, holds the span
  that records nothing (DefaultSpanRecorder.NOOP_SPAN) and is the base
  class an implementation extends to record only what it cares about;
- SpanSupport moved from com.clickhouse.client.api.internal to the
  public com.clickhouse.client.api.observability package and turned into
  an instance base class with overridable methods, so another
  implementation can reuse or extend the client's attribute values;
- the single-endpoint special case is gone - an operation span reports
  the first configured endpoint, while every attempt keeps reporting its
  own endpoint on the request span.

A recorder that returns no span can no longer break an operation, and a
recorder that records nothing keeps the fast path. Tests cover a
partial implementation, a recorder returning null, and using and
extending SpanSupport from another package.
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

Triage

Category: featureRisk: high

Summary
Implements issue #2974 (PR 1 of 2): a backend-agnostic span-recording SPI for client-v2 observability. Adds a new public package com.clickhouse.client.api.observability (SpanRecorder, Span, SpanAttribute, DefaultSpanRecorder), a Client.Builder.setSpanRecorder(...) entry point, an internal SpanSupport (337 LOC) that computes OTel-convention attribute values, and instruments the query/command, both insert, ping and schema paths in Client.java plus per-attempt request spans in HttpAPIClientHelper.executeRequest. No OpenTelemetry dependency; the no-recorder path short-circuits on NOOP reference checks. ~750 LOC production + ~1,150 LOC new tests (1,929 additions total), plus CHANGELOG and docs/features.md updates.

What this impacts

  • client-v2 public API surface: new observability package, new builder method, new executeRequest(TransportRequest, Span) overload and HttpAPIClientHelper constructor (all additive).
  • client-v2 hot paths: every query/insert/command/ping/schema operation and every HTTP request attempt (including retries) now passes through span wiring in Client.java and HttpAPIClientHelper.java.
  • Test helpers for constructing HttpAPIClientHelper were adjusted (HttpAPIClientHelperFactory, minor edits to two existing tests).

Concerns

  • Large diff rule fires: 1,929 additions across 19 files (~750 LOC production per the author's own count) — well past the 400-LOC High threshold; the repo policy is to request a split, though this is already slice 1 of an agreed 2-PR plan.
  • Hot-path instrumentation: span start/attribute calls are added inside the per-request retry loop and all operation paths; overhead in the default path relies on NOOP reference-equality short-circuits. A benchmark or allocation check on the no-recorder path would justify the "zero-overhead default" claim.
  • PR description drifts from the diff: the body says SpanRecorder/Span are interfaces with no-op defaults, SpanRecorder.NOOP, and setSpanRecorder(null) ⇒ record nothing; the actual code ships a DefaultSpanRecorder base class and rejects null ("spanRecorder is required; use DefaultSpanRecorder.NOOP"). This also contradicts the issue's explicit "null means record nothing" contract — reviewer should reconcile spec, body and code.
  • Reviewer chernser has already requested changes on this PR; existing labels (risk:high, triage:feature) match this assessment.

Required reviewer action

  • high — at least one human reviewer.

…ration

Addresses two review comments on #2988.

The insert paths unregistered their transport request in a finally attached
to every attempt of the retry loop, so between two attempts the query id
resolved to nothing at all and cancelTransportRequest() had nothing to look
up. Both insert paths now unregister once in a finally around the whole retry
loop - the shape the query path already had. Covered by two tests: the
registration is observed to survive the gap between two attempts through the
public DataStreamWriter.onRetry() hook, and it is asserted to be gone once
the operation ended for query, stream insert and POJO insert, both when the
operation recovers on a retry and when it exhausts its retries.

The HttpAPIClientHelper constructor overload added by this PR is removed, so
the helper keeps a single constructor. Tests build it through a new
HttpAPIClientHelperFactory instead, so a future constructor change is applied
in one place.
@polyglotAI-bot

Copy link
Copy Markdown
Collaborator Author

@chernser pushed 1d0c39c5 with the two mechanical review items:

  • unregisterTransportReq placement - both insert paths now unregister once in a finally around the retry loop (the shape queryImpl already had). Two tests, one of which probes the inter-attempt window deterministically via DataStreamWriter.onRetry() and fails on the previous code. Details + one caveat that is pre-existing and not fixed here (a cancel landing in that window still targets the completed request) in that thread.
  • HttpAPIClientHelper constructor overload - removed; tests build the helper through a new single-method HttpAPIClientHelperFactory.

Verification: client-v2 545 unit tests and 163 integration tests green; jdbc-v2 and packages/clickhouse-jdbc-all build. No existing test was weakened - the only edits to existing tests are the constructor call sites you asked for.

Still waiting on your call for one thing before I touch it: r3692397262 / r3692401134 - "operations should be done via span recorder, no need extra class: spanRecorder.recordSuccess() / recordError()". That pulls the opposite way from r3692365724, where you asked me to move SpanSupport into the observability package as an OOP base class - which I did. The concrete fork is in that thread: fold the attribute-value computation into DefaultSpanRecorder and put recordSuccess/recordError/recordHttpStatus/recordEndpoint on the SpanRecorder interface (one class, but record* becomes overridable, so a recorder can report values that differ from the standard ones), versus keeping the current split where the client computes the values and every recorder therefore reports the same thing. I'll implement whichever you pick.

@polyglotAI-bot

Copy link
Copy Markdown
Collaborator Author

Merged main into the branch to clear the conflict with base (both sides had added entries at the top of CHANGELOG.md and touched docs/features.md; all entries from both sides are kept). No code change in this push — it is a merge commit only (ee72d9c5).

Verification after the merge: client-v2 unit tests 545 passed, SpanRecorderTest integration test 6 passed, jdbc-v2 builds against the merged client-v2.

@chernser the PR is still waiting on one design answer before it can be finished — review threads r3692397262 / r3692401134: whether the attribute-value computation stays in the reusable SpanSupport class (the shape you asked for in r3692365724, currently implemented) or moves onto the SpanRecorder interface as recordSuccess() / recordError(). The trade-off is in #2988 (comment). Everything else you raised is addressed. PR 2 of 2 (the OpenTelemetry recorder module) starts once this lands.

@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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ee72d9c. Configure here.

The request span reported http.response.status_code only when the request
returned or when the failure carried a ServerException, so the status was
dropped for the responses the transport maps onto an exception that does not
carry it: 407 (ClientMisconfigurationException), 502 and 503
(ConnectException) and an unknown status (ClientException). A trace of a
gateway outage therefore had no status at all.

The status is now recorded in the single place where a request is executed,
directly after the response head arrives, so every response reports it.
Comment thread client-v2/src/main/java/com/clickhouse/client/api/Client.java Outdated
Comment thread client-v2/src/main/java/com/clickhouse/client/api/Client.java Outdated
Comment thread client-v2/src/main/java/com/clickhouse/client/api/observability/SpanSupport.java Outdated
…servability-span-spi

# Conflicts:
#	client-v2/src/main/java/com/clickhouse/client/api/Client.java
#	client-v2/src/test/java/com/clickhouse/client/api/transport/TransportBaseTests.java
@polyglotAI-bot

Copy link
Copy Markdown
Collaborator Author

Rebased on main (merge commit 45645521) after #2990 merged. No behaviour change in this push — conflict resolution only.

Conflicts and how they were resolved

client-v2/.../Client.java (POJO insert retry loop):

  • kept main's failIfCancelled(queryId, i, lastException) at the top of every attempt;
  • kept this PR's span calls (executeRequest(transportRequest, operationSpan) and spanSupport.recordSuccess(...));
  • kept one unregisterTransportReq(queryId) per operation, in the outer finally that also ends the operation span, instead of main's separate try { loop } finally { unregister }. Same semantics main asked for (the request of the last attempt stays registered until the operation is over), and it keeps the three retry loops the same shape — the query and stream-insert paths merged into exactly that shape automatically.

client-v2/.../TransportBaseTests.java: union of both test sets — main's testCancelBetweenRetryAttempts (+ cancelBetweenAttemptsProvider) and testFirstAttemptNotStoppedByAnotherCancelledOperation, plus this PR's testTransportRequestStaysRegisteredBetweenRetries and testTransportRequestUnregisteredWhenOperationEnds. No test was edited or removed.

CHANGELOG.md: kept both sides' entries, with one removal — this PR's Bug Fixes entry about the insert unregistering its transport request after every attempt is now redundant: #2990 fixed the registration lifetime for all three operation paths and its entry (issue #2989) already describes it. Keeping both would claim the same fix twice.

docs/features.md auto-merged; the span section is intact.

Verification (worktree on this branch, fresh ClickHouse server):

  • mvn -pl client-v2 -DskipITs=true test550 passed, 0 failures (same count as before the merge)
  • mvn -pl client-v2 -Dit.test=TransportBaseTests verify32 passed (both sides' tests)
  • mvn -pl client-v2 -Dit.test=SpanRecorderTest verify6 passed
  • mvn -pl jdbc-v2 -DskipTests install → BUILD SUCCESS

@chernser one open question still blocks the rest of this PR (threads r3692397262 / r3692401134): should the attribute-value computation stay in the reusable SpanSupport class, or move onto SpanRecorder as recordSuccess() / recordError()? The trade-off is that overridable record* methods let a recorder deviate from the standard attribute values, which the current split guarantees. PR 2 of 2 (the OpenTelemetry recorder module) waits for this one to land.

@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.

  • sync with main
  • see comments and change the code.
  • add instructions instead of heavy refactoring - span will start within existing methods. no need to wrap trying to deduplicate code. always check if deduplication causes wrapping exception handling or adds complexity.

…ion methods

Per @chernser's review on #2988:

- Revert the private queryImpl(sql, params, settings, operationName, collectionName)
  overload. ping() and getTableSchemaImpl() call query(...) again, unchanged from main.
  Every operation the client implements on top of a query is reported as a query; a
  recorder that wants to describe it differently derives that from the settings it is
  given. Drops the OPERATION_PING / OPERATION_GET_TABLE_SCHEMA constants, which no
  longer have a producer, and the two extra startQuerySpan parameters.
- Revert the runOperation(...) wrapper. The three core methods call runAsyncOperation
  again, so no exception handling is added around them.
- SpanSupport requires a non-null recorder, and Builder.setSpanRecorder rejects null:
  the default is already DefaultSpanRecorder.NOOP, so a null recorder is a
  configuration error, not a way to disable recording.

Tests: SpanRecorderTest asserts ping and getTableSchema now report a plain query span
with the statement they run; new cases pin the rejection of a null recorder on both the
SPI class and the builder. docs/features.md and the CHANGELOG entry follow the code.

@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.

turn around SpanSupport and SpanRecorder: span recorder is things called first because it can be completely custom. SpanSupport can be used by implementation to fill common fields from known structures but its logic should be opt-in.

The client held a SpanSupport that wrapped the registered recorder: the
client called the support, which computed the span name and every
attribute and then asked the recorder only to start a span. An
implementation could therefore not change any of those values.

Turn the layering around, as requested in review:

- The client now holds the SpanRecorder and calls it first, with
  everything it knows about the operation - the settings object, the
  statement, the target table, the batch size, the endpoint, the metrics
  of the completed operation, the failure and the HTTP status.
- SpanSupport no longer wraps a recorder and holds no state. It derives
  the standard span names and attribute values from those same
  structures, and a recorder implementation calls it when it wants them.
  Using it is opt-in and every method may be overridden;
  DefaultSpanRecorder#getSpanSupport() is the entry point for a subclass.
- SpanRecorder and Span stay plain interfaces without default methods;
  DefaultSpanRecorder keeps providing the no-op behaviour, and it now
  also answers the outcome methods.

A recorder is never handed a span it did not create, and a request that
is executed without a span reports nothing to the recorder.

Tests assert the new layering: a recorder that ignores SpanSupport gets
only the values it sets itself (its support accessor fails the test when
the client reaches for it), a recorder that opts in gets the standard
ones, and the values SpanSupport derives are pinned directly.
@polyglotAI-bot

Copy link
Copy Markdown
Collaborator Author

Pushed 72e6167 — the SPI layering is inverted as requested (details in the thread on SpanSupport.java), and the branch is synced with main. client-v2 556 unit tests + 38 ITs green, jdbc-v2 builds.

Two residual points I did not change, because both follow from earlier revert requests. Say the word and each is a few lines:

  1. A rejected operation submit leaves its span unended. The operation span is started on the calling thread (so it joins the caller's ambient trace) and is ended in the supplier's finally. With async_operations, if the executor rejects the task — a closed client — the supplier never runs, so the span is neither failed nor ended. Re-adding the wrapper that covered this is what you asked to revert as unneeded exception-handling complexity, so I left it out; docs/features.md states the guarantee only for an operation that starts.

  2. HttpAPIClientHelper.executeRequest(TransportRequest) is bypassed on the span path. A subclass that overrides the public single-argument method is still called when no recorder is registered (the span path short-circuits to it), but with a recorder registered the request goes through the internal execution method instead. Making the span path share one overridable entry point would need another method on the helper, which cuts against avoiding overloads there.

@sonarqubecloud

Copy link
Copy Markdown

@chernser
chernser merged commit 40464dd into main Aug 18, 2026
36 of 42 checks passed
@chernser
chernser deleted the polyglot/client-v2-observability-span-spi branch August 18, 2026 23:27
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.

2 participants