Skip to content

feat(client-v2-otel): add OpenTelemetry span recorder module - #3065

Merged
chernser merged 7 commits into
mainfrom
polyglot/client-v2-opentelemetry-span-recorder
Aug 26, 2026
Merged

feat(client-v2-otel): add OpenTelemetry span recorder module#3065
chernser merged 7 commits into
mainfrom
polyglot/client-v2-opentelemetry-span-recorder

Conversation

@polyglotAI-bot

Copy link
Copy Markdown
Collaborator

Description

Implements #2974PR 2 of 2, on top of the SPI merged in #2988.

Adds the optional module com.clickhouse:client-v2-otel with OpenTelemetrySpanRecorder, a consumer of the merged SPI. It is registered like any other recorder:

Client client = new Client.Builder()
        .addEndpoint("http://localhost:8123")
        .setSpanRecorder(new OpenTelemetrySpanRecorder(openTelemetry))
        .build();

No change to client-v2 code: the module only implements SpanRecorder and opts in to SpanSupport for the standard names and attributes, so it reports the same information as any other recorder.

Design

  • OpenTelemetrySpanRecorder extends DefaultSpanRecorder (package com.clickhouse.client.api.observability.otel). Every start... method takes the name from SpanSupport (querySpanName / insertSpanName / requestSpanName) and the attributes from fill*Attributes; every record... method delegates to the matching SpanSupport method. Nothing is recomputed here.
  • Construction: new OpenTelemetrySpanRecorder(openTelemetry), OpenTelemetrySpanRecorder.forTracer(tracer) (application-chosen instrumentation scope), or new OpenTelemetrySpanRecorder() for GlobalOpenTelemetry. The global instance is read when a span is started, not in the constructor, so a client may be built before the application installs its SDK (reading it too early would pin the no-op instance and make a later GlobalOpenTelemetry.set(...) throw). Default scope name: com.clickhouse.client.
  • Nesting: an operation span is started under Context.current(), so it joins the application's ambient trace; each request span — one per attempt, including retries — is started under its operation span's context. A request span whose operation span was not created by this recorder falls back to the current context instead of failing. Both kinds are SpanKind.CLIENT.
  • Attribute typing is explicit, because a backend indexes by type: String → string, Boolean → boolean, Double/Float → double, any other Number → long, anything else → String.valueOf. A null key or value records nothing.
  • Failure: setError sets status ERROR and records error.type; recordFailure / recordRequestFailure additionally record the throwable as an OpenTelemetry exception event, so the message and stack trace are not lost (the SPI hands the recorder the throwable; error.type alone drops everything but the class name).
  • end() is idempotent (AtomicBoolean), matching the SPI contract; the recorder holds no per-operation state and is thread-safe.
  • The recorder does not make a span current: the client hands its response to the caller before the body is read, so spans are ended on threads the recorder does not control.

Dependency placement. opentelemetry-api is a normal dependency of this module only; client-v2 is untouched and still needs no OpenTelemetry on the classpath, which is the issue's "no new runtime dependency" constraint. The module is not added to packages/clickhouse-jdbc-all — that would shade OpenTelemetry into the uber-jar for every JDBC user, and jdbc-v2 has no way to configure a recorder yet (see Follow-ups). Say the word if you want it in the package anyway; it is a two-line change.

Compatibility: purely additive — a new module and one new public class. No existing signature or behaviour changed. Java 8 (release 8).

Changes

  • client-v2-otel/pom.xml — new module: depends on client-v2 + opentelemetry-api; test scope adds opentelemetry-sdk, opentelemetry-sdk-testing, TestNG and the clickhouse-client test-jar for the integration harness.
  • client-v2-otel/.../observability/otel/OpenTelemetrySpanRecorder.java — the recorder and its Span implementation.
  • pom.xml — new <module>client-v2-otel</module> and the opentelemetry.version property (1.51.0).
  • CHANGELOG.md, docs/features.md — new client-v2-otel section, including the compatibility-sensitive traits (span kind/nesting, attribute typing, failure mapping, idempotent end, no span made current).

Test

New tests only; no existing test edited or weakened.

  • OpenTelemetrySpanRecorderUnitTest (25 cases, in-memory exporter): query span name/kind/scope and every standard attribute; insert span with db.collection.name + db.operation.batch.size, and a contrast case that a stream insert (BATCH_SIZE_UNKNOWN) records no batch size and an insert records no db.query.text; request span is a child of the operation span with http.request.method / http.response.status_code / per-attempt server.address; two attempts under one operation span (failed attempt is ERROR, retry is UNSET, operation stays UNSET); operation span joins an ambient trace; foreign operation span → current context (with and without an ambient span); client failure → ERROR + error.type and no server error code; ServerExceptionerror.type, db.response.status_code=60, http.response.status_code=404 on the request span and the operation span; success records the query id and db.response.returned_rows, and records nothing when metrics are null; failure recorded as an exception event with type and message; idempotent end(); attribute typing via @DataProvider (8 rows: String / Boolean / int / long / short / double / float / other object); null key or value ignored; forTracer reports under the given scope name and version; null OpenTelemetry / Tracer rejected.
  • OpenTelemetrySpanRecorderTest (3 integration cases, real server): a successful query exports the operation span with db.response.returned_rows=3, the server-assigned query id and a child POST span with HTTP 200; a failing query exports ERROR + error.type=…ServerException + db.response.status_code=60 on the operation span and HTTP 404 on the request span; a POJO insert exports insert <db>.<table> with db.operation.batch.size=1 and its child request span.
  • Verification: mvn -pl client-v2-otel -DskipITs=true test25 passed; mvn -pl client-v2-otel -DskipUTs=true -Dit.test=OpenTelemetrySpanRecorderTest verify3 passed; mvn -pl client-v2 -DskipITs=true test556 passed (unchanged); mvn -Dj8 -DskipTests install (full reactor, incl. jdbc-v2 and packages/clickhouse-jdbc-all) → BUILD SUCCESS.

Docs / surface

  • CHANGELOG.md: entry under 0.11.0-rc1 → New Features, tagged **[client-v2-otel]**, with the issue link. The feat(client-v2): add span recorder SPI for operation and request tracing #2988 entry's closing sentence now points at this module instead of announcing it as upcoming.
  • docs/features.md: new ## client-v2-otel section with a feature list and compatibility-sensitive traits.
  • No version bump (additive feature inside the in-progress 0.11.0-rc1). No backport needed.

docs/changes_checklist.md walk-through

  • New method / class added: OpenTelemetrySpanRecorder follows the module's naming and the SPI's documented extension pattern (extend DefaultSpanRecorder, override what you record); nullability is explicit (null OpenTelemetry/Tracer rejected with IllegalArgumentException, null attribute key/value ignored); forTracer(...) is a static factory rather than a second constructor so new OpenTelemetrySpanRecorder(null) cannot be an ambiguous call; behaviour-focused tests added; docs/features.md updated.
  • New module / dependency added: one new dependency (opentelemetry-api), scoped to the new module only, version pinned by a parent property next to the other version properties. client-v2 and clickhouse-jdbc-all gain nothing transitively.
  • Exception handling: no exception is swallowed or retyped — the recorder only reports the throwable it is given.
  • Conditional logic: the added guards are null checks and the instanceof fallback for a foreign operation span; both are covered by tests.
  • Logging: none added.

CI note (no workflow file touched, per AGENTS.md)

The whole-reactor compile job builds the new module and runs its unit tests, so they gate this PR. Two things need a workflow change, which I did not make:

  1. build.yml / test_head.yml enumerate projects explicitly (project: ["clickhouse-http-client", "client-v2", …]), so the module's integration test does not run in CI until client-v2-otel is added to those matrices.
  2. release.yml enumerates the jars attached to a release, so the new artifact must be added there before it is published.

Tell me which you want and I will add it in a follow-up (or apply it here if you prefer a CI change in this PR).

Pre-PR validation gate

  • Works via the real entry point (integration tests run query, failing query and POJO insert against a live server through Client)
  • Public API fits sibling conventions; surface no wider than needed
  • All applicable entry points + edge cases covered (query, insert, request/retry, success, client failure, server failure, ambient context, foreign parent, attribute typing, null input)
  • 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

jdbc-v2 surfacing — still the open question from #2988: jdbc-v2 builds its Client from string properties, so injecting a recorder needs its own small decision (a span_recorder driver property naming a class to instantiate, or a setter on DataSourceImpl). @chernser which would you like? I kept it out of this PR so the recorder itself can land independently.

Adds the optional module client-v2-otel with OpenTelemetrySpanRecorder, an
implementation of the client-v2 observability SPI that reports operation and
transport-request spans to OpenTelemetry. The recorder derives every span name
and attribute through SpanSupport, so it reports the standard values, and maps
them onto OpenTelemetry: CLIENT spans, an operation span under the current
context, a request span per attempt under its operation span, typed attributes,
and ERROR status plus an exception event on failure.

Implements: #2974
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Client V2 Coverage

Coverage Report

Package Coverage Lines Covered Total Lines
com.clickhouse.client.api 57.04% 689 1208
com.clickhouse.client.api.command 0.00% 30
com.clickhouse.client.api.data_formats 46.88% 285 608
com.clickhouse.client.api.data_formats.internal 51.54% 1287 2497
com.clickhouse.client.api.enums 85.71% 12 14
com.clickhouse.client.api.http 0.00% 1
com.clickhouse.client.api.insert 75.73% 78 103
com.clickhouse.client.api.internal 59.30% 953 1607
com.clickhouse.client.api.metadata 75.93% 41 54
com.clickhouse.client.api.metrics 45.88% 39 85
com.clickhouse.client.api.observability 96.15% 125 130
com.clickhouse.client.api.observability.otel 98.65% 73 74
com.clickhouse.client.api.query 57.23% 91 159
com.clickhouse.client.api.serde 77.19% 44 57
com.clickhouse.client.api.sql 87.50% 28 32
com.clickhouse.client.api.transport 93.10% 81 87
Class Coverage
Class Coverage Lines Covered Total Lines
com.clickhouse.client.api.ClickHouseException 57.14% 8 14
com.clickhouse.client.api.Client 56.26% 283 503
com.clickhouse.client.api.Client.Builder 32.79% 80 244
com.clickhouse.client.api.Client.new DataStreamWriter() {...} 75.00% 6 8
com.clickhouse.client.api.ClientConfigProperties 80.60% 162 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 0.00% 17
com.clickhouse.client.api.command.CommandSettings 0.00% 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 90.00% 9 10
com.clickhouse.client.api.data_formats.GsonJsonParserFactory.JsonParserImpl 0.00% 11
com.clickhouse.client.api.data_formats.GsonJsonParserFactory.new TypeToken() {...} 100.00% 1 1
com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader 41.73% 174 417
com.clickhouse.client.api.data_formats.internal.AbstractBinaryFormatReader.RecordWrapper 14.71% 5 34
com.clickhouse.client.api.data_formats.internal.BinaryReaderBackedRecord 0.00% 88
com.clickhouse.client.api.data_formats.internal.BinaryStreamReader 60.82% 298 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 60.00% 6 10
com.clickhouse.client.api.data_formats.internal.InetAddressConverter 0.00% 27
com.clickhouse.client.api.data_formats.internal.MapBackedRecord 19.23% 45 234
com.clickhouse.client.api.data_formats.internal.NumberConverter 81.72% 76 93
com.clickhouse.client.api.data_formats.internal.NumberConverter.NumberType 85.71% 6 7
com.clickhouse.client.api.data_formats.internal.ProcessParser 83.33% 35 42
com.clickhouse.client.api.data_formats.internal.SerializerUtils 55.57% 474 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 0.00% 62
com.clickhouse.client.api.data_formats.NativeFormatReader.Block 0.00% 18
com.clickhouse.client.api.data_formats.RowBinaryFormatReader 0.00% 19
com.clickhouse.client.api.data_formats.RowBinaryFormatSerializer 15.65% 18 115
com.clickhouse.client.api.data_formats.RowBinaryFormatWriter 31.68% 32 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 77.27% 17 22
com.clickhouse.client.api.data_formats.RowBinaryWithNamesFormatReader 0.00% 23
com.clickhouse.client.api.DataStreamWriter 0.00% 1
com.clickhouse.client.api.DataTransferException 50.00% 2 4
com.clickhouse.client.api.DataTypeUtils 52.50% 63 120
com.clickhouse.client.api.enums.Protocol 0.00% 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 33.33% 5 15
com.clickhouse.client.api.insert.InsertSettings 82.95% 73 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 0.00% 74
com.clickhouse.client.api.internal.ClickHouseLZ4OutputStream 0.00% 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 90.28% 65 72
com.clickhouse.client.api.internal.CompressedEntity 0.00% 35
com.clickhouse.client.api.internal.CredentialsManager 61.54% 40 65
com.clickhouse.client.api.internal.DataTypeConverter 86.27% 220 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 67.47% 363 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 58.33% 7 12
com.clickhouse.client.api.internal.HttpAPIClientHelper.TransportResponseImpl 75.00% 12 16
com.clickhouse.client.api.internal.LZ4Entity 29.27% 12 41
com.clickhouse.client.api.internal.MapUtils 30.65% 19 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 4.88% 2 41
com.clickhouse.client.api.internal.SslContextProvider.Builder 71.05% 27 38
com.clickhouse.client.api.internal.SslContextProvider.NonValidatingTrustManager 25.00% 1 4
com.clickhouse.client.api.internal.StopWatch 46.67% 7 15
com.clickhouse.client.api.internal.TableSchemaParser 0.00% 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 71.79% 28 39
com.clickhouse.client.api.metrics.ClientMetrics 100.00% 7 7
com.clickhouse.client.api.metrics.MicrometerLoader 0.00% 44
com.clickhouse.client.api.metrics.OperationMetrics 89.47% 17 19
com.clickhouse.client.api.metrics.OperationType 100.00% 3 3
com.clickhouse.client.api.metrics.ServerMetrics 100.00% 12 12
com.clickhouse.client.api.observability.DefaultSpanRecorder 100.00% 12 12
com.clickhouse.client.api.observability.DefaultSpanRecorder.NoopSpan 75.00% 3 4
com.clickhouse.client.api.observability.otel.OpenTelemetrySpanRecorder 100.00% 47 47
com.clickhouse.client.api.observability.otel.OpenTelemetrySpanRecorder.OpenTelemetrySpan 96.30% 26 27
com.clickhouse.client.api.observability.SpanAttribute 100.00% 25 25
com.clickhouse.client.api.observability.SpanSupport 95.51% 85 89
com.clickhouse.client.api.query.NullValueException 50.00% 2 4
com.clickhouse.client.api.query.QueryResponse 35.14% 13 37
com.clickhouse.client.api.query.QuerySettings 88.37% 76 86
com.clickhouse.client.api.query.QueryStatement 0.00% 4
com.clickhouse.client.api.query.Records 0.00% 23
com.clickhouse.client.api.query.Records.new Iterator() {...} 0.00% 5
com.clickhouse.client.api.serde.DataSerializationException 33.33% 2 6
com.clickhouse.client.api.serde.POJOSerDe 85.71% 42 49
com.clickhouse.client.api.serde.SerializerNotFoundException 0.00% 2
com.clickhouse.client.api.ServerException 92.31% 12 13
com.clickhouse.client.api.ServerException.ErrorCodes 0.00% 9
com.clickhouse.client.api.Session 78.26% 36 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 88.00% 44 50
com.clickhouse.client.api.transport.HttpEndpoint.EndpointDetails 100.00% 6 6
com.clickhouse.client.api.TransportException 0.00% 3

@github-actions

github-actions Bot commented Aug 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 80.56% 1695 2104
com.clickhouse.jdbc.internal 89.35% 1250 1399
com.clickhouse.jdbc.internal.parser.antlr4 40.85% 6381 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.68% 4806 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 100.00% 12 12
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4AndParamsParser.ParseStatementAndParamsListener 92.86% 13 14
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4Parser 100.00% 43 43
com.clickhouse.jdbc.internal.SqlParserFacade.ANTLR4Parser.ParsedPreparedStatementListener 98.18% 54 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 Aug 19, 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

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

@mshustov
mshustov requested a balanced review from Copilot August 20, 2026 16:05

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 an optional OpenTelemetry implementation of the client-v2 span recorder SPI for issue #2974.

Changes:

  • Adds OpenTelemetrySpanRecorder with typed attributes, nesting, failures, and idempotent completion.
  • Adds unit and integration coverage.
  • Registers and documents the new Maven module.

Compatibility is additive; existing client-v2 dependencies remain unchanged. The request URL contract and lazy-global test coverage remain unresolved. Author-reported tests were not independently rerun.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pom.xml Registers the module and OpenTelemetry version.
client-v2-otel/pom.xml Defines dependencies and Java 8 compilation.
OpenTelemetrySpanRecorder.java Implements the OpenTelemetry recorder.
OpenTelemetrySpanRecorderUnitTest.java Tests recorder behavior and edge cases.
OpenTelemetrySpanRecorderTest.java Adds live-server tracing tests.
docs/features.md Documents features and compatibility traits.
CHANGELOG.md Announces the new module.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

- INSTRUMENTATION_SCOPE_NAME is documented as the default scope name, and
  the javadoc now states that forTracer(Tracer) reports the scope of the
  given tracer instead.
- Add a test that creates the no-argument recorder before the global SDK
  is installed and asserts that a span started afterwards reaches that
  SDK. It fails if the global instance is read in the constructor.
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

Triage

Category: featureRisk: high

Summary
Adds a new optional Maven module com.clickhouse:client-v2-otel containing OpenTelemetrySpanRecorder, an OpenTelemetry consumer of the observability SPI merged in #2988 (PR 2 of 2 for issue #2974). The recorder maps client operations and per-attempt transport requests to OpenTelemetry CLIENT spans, delegating names/attributes to SpanSupport so nothing is recomputed; failures become ERROR status plus exception events, and end() is idempotent. client-v2 source is untouched — changes are the new module (266-line recorder + 611 lines of unit/integration tests + pom), a <module> entry and opentelemetry.version property (1.51.0) in the root pom.xml, and CHANGELOG/docs/features.md updates.

What this impacts

  • New module client-v2-otel/ — new public class OpenTelemetrySpanRecorder (additive API surface, opt-in via Client.Builder.setSpanRecorder)
  • Root pom.xml — new module + opentelemetry.version property; new dependency io.opentelemetry:opentelemetry-api scoped to the new module only (not shaded into clickhouse-jdbc-all)
  • CHANGELOG.md, docs/features.md — documentation of the new module and its compatibility-sensitive traits
  • No changes to client-v2, jdbc-v2, or any existing source

Concerns

  • Large-diff rule fired: +1002 lines (> 400 LOC threshold). Mitigating context: ~611 lines are new tests and ~110 are pom/docs; main source is a single self-contained 266-line class in a new module, so a split may not add much value — reviewer judgment call.
  • New third-party dependency (opentelemetry-api 1.51.0) introduced; scoped to the optional module only, matching the issue's "no new runtime dependency in client-v2" constraint.
  • CI/release gap acknowledged in the PR body: the module's integration tests won't run in CI (build.yml/test_head.yml enumerate projects explicitly) and release.yml won't publish the artifact until follow-up workflow changes are made — the new code is only gated by the whole-reactor compile + unit tests.
  • Required checks (Compile JDK 8, JVM Compatibility, SonarCloud) were still in progress at triage time.

Required reviewer action

  • At least one human reviewer.

@chernser chernser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • move this code to client-v2 project
  • opentelementry depedencies should be compile only - if they provided at runtime we can use it.
  • see comments.

The recorder overrides every method of the SPI, so the base class added
nothing but its getSpanSupport() accessor. Implement the interface and
call SpanSupport.DEFAULT directly, which is where the logic lives.
- SpanSupport is a member of the recorder now, as it implements the
  interface directly.
- Removed the forTracer(Tracer) factory: a public constructor takes the
  tracer instead.
- Removed the duplicated Supplier<Tracer> bodies. The tracer field is
  the single state: the OpenTelemetry constructor resolves the tracer
  from the instance, and the no-argument constructor leaves it unset,
  which keeps the documented lazy read of GlobalOpenTelemetry.
Review feedback from @chernser:
- move this code to client-v2 project
- opentelemetry dependencies should be compile only

The client-v2-otel module is removed and OpenTelemetrySpanRecorder, its
unit test and its integration test move into client-v2 unchanged (the
package com.clickhouse.client.api.observability.otel is kept).

opentelemetry-api is declared with scope provided in client-v2, the same
way jackson and gson already are: it is on the compile and test
classpath only, it is not transitive to consumers, and the recorder is
usable by an application that already provides the OpenTelemetry API at
runtime. Core client-v2 has no reference to the recorder, so a user
without OpenTelemetry on the classpath never loads the class.

Verified: no io/opentelemetry entry in the client-v2 "all" shaded jar or
in the clickhouse-jdbc-all uber jar, while the recorder class ships in
the plain client-v2 jar. client-v2 unit tests 582 pass (556 before, plus
the 26 moved), the 3 integration tests pass, and the full reactor builds.
Moving into client-v2 also puts both suites into the CI matrix, which the
separate module was not part of.
@polyglotAI-bot

Copy link
Copy Markdown
Collaborator Author

Both items from the review are done in 31e2187a9.

1. Moved into client-v2. The client-v2-otel module is gone. OpenTelemetrySpanRecorder and both of its tests moved into client-v2 unchanged, keeping the package com.clickhouse.client.api.observability.otel. Git records all three as pure renames, so the diff is only the poms, the CHANGELOG and docs/features.md.

A side benefit: the separate module was never added to the CI matrix in build.yml / test_head.yml, so its integration test did not run in CI and release.yml would have needed the new jar listed before publishing. Both of those go away — the code is now in a module the matrix already builds and tests.

2. OpenTelemetry is compile-only. opentelemetry-api is declared in client-v2 with <scope>provided</scope>, the same way jackson and gson already are in that pom. It is on the compile and test classpath, it is not transitive to consumers, and the recorder is used only by an application that already provides the API at runtime. opentelemetry-sdk and opentelemetry-sdk-testing stay test.

Verified rather than assumed:

  • mvn dependency:list -pl client-v2 shows opentelemetry-api and its transitive opentelemetry-context as provided, and the SDK artifacts as test. Nothing at compile or runtime scope.
  • The published (flattened) pom carries <scope>provided</scope>, so nothing is pulled into a consumer build.
  • Zero io/opentelemetry entries in the client-v2 all shaded jar and zero in the clickhouse-jdbc-all uber jar, while OpenTelemetrySpanRecorder.class does ship in the plain client-v2 jar. provided is excluded from shading, so this also settles the earlier clickhouse-jdbc-all question: OpenTelemetry is not shaded in for JDBC users.
  • No class in client-v2 outside the observability.otel package imports io.opentelemetry (the mentions in Span, SpanAttribute and SpanSupport are javadoc references to the semantic conventions). The recorder is therefore never loaded for a user who does not ask for it, which is what makes the compile-only dependency safe.

Tests: client-v2 unit tests 582 pass — 556 before plus the 26 moved, none changed — the 3 integration tests pass against a live server, and the full reactor builds with the module removed.

Still open and waiting on you, unchanged by this push: the url.full request-span attribute (Copilot's comment on the old line 132 — needs an SPI decision), and whether the no-argument constructor should keep its lazy GlobalOpenTelemetry read or become this(GlobalOpenTelemetry.get()).

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

I've realized that API of span recorder lacks separation by operation type. Add it in this PR (it is fine because we working on one big feature) as two separate methods for query and insert. Each track should result collecting specific metric from com.clickhouse.client.api.metrics.OperationMetrics.

Class com.clickhouse.client.api.metrics.OperationMetrics should have operation type - small enum. Just in case.

The recorder reported the outcome of every completed operation through one
recordSuccess method, so a query and an insert were indistinguishable at the
point where the metrics of the operation are read, and only the metrics of a
read were recorded.

Split it into recordQuerySuccess and recordInsertSuccess. Each track records
the metrics that describe its own kind of operation: a query reports the
returned rows and what the server read, an insert reports what the server
wrote. OperationMetrics carries the kind as well, through the new
OperationType enum, so a caller that keeps the metrics knows which of them
are meaningful.
@polyglotAI-bot

Copy link
Copy Markdown
Collaborator Author

Done in bc5189b — both items.

Separation by operation type. SpanRecorder.recordSuccess(Span, OperationMetrics) is now two methods: recordQuerySuccess and recordInsertSuccess, the counterparts of startQuerySpan / startInsertSpan. Client calls the matching one on each of its three completion paths (POJO insert, stream insert, query). SpanRecorder stays a plain interface with no default methods.

Each track collects the metrics of its own kind of operation from OperationMetrics:

  • query — db.response.returned_rows (RESULT_ROWS), clickhouse.response.read_rows (NUM_ROWS_READ), clickhouse.response.read_bytes (NUM_BYTES_READ)
  • insert — clickhouse.response.written_rows (NUM_ROWS_WRITTEN), clickhouse.response.written_bytes (NUM_BYTES_WRITTEN)
  • both — clickhouse.query_id

The server sends the whole summary for either kind, so this is a real filter, not just a rename: a query span never claims written rows and an insert span never claims returned rows. ProcessParser pre-sets every server metric to -1 before it applies the summary, so a metric the server did not report is left out rather than recorded as a negative count.

OperationMetrics operation type. New com.clickhouse.client.api.metrics.OperationType (QUERY, INSERT, UNKNOWN) with OperationMetrics#getOperationType(). Client sets it on every operation it completes; the existing single-argument constructor is kept and maps to UNKNOWN, so user code that builds its own metrics still compiles. It reports the kind of the call the application made, not the kind of work the server did — an INSERT INTO ... SELECT run through execute is a statement, so it is reported as a query. That is stated in the javadoc and in the docs.

Verification. 586 client-v2 unit tests and 4 integration tests against a live server, none of the existing ones edited or weakened. The new coverage pins the separation itself, not just the new names: one test feeds a summary that carries both read and write metrics to both tracks and asserts each span gets only its own; with the tracks recording the same thing it fails. The integration tests assert the real values through the real entry points — read_rows on a query span, written_rows on a POJO insert and on a stream insert (the second insert entry point, which was not covered before). CHANGELOG.md and docs/features.md updated.

Question — should the failure callback be split too? I left recordFailure(Span, Throwable) as one method, because a failure carries no OperationMetrics and so has nothing operation-specific to collect. Say the word if you want recordQueryFailure / recordInsertFailure for symmetry and I will add them.

Still open from earlier, both needing your call: the url.full attribute on request spans (the SPI's startRequestSpan is not given the URI), and whether the no-argument constructor keeps its lazy GlobalOpenTelemetry read.

Comment thread client-v2/src/main/java/com/clickhouse/client/api/metrics/OperationMetrics.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.

remove operation type UNKNOWN because we always know operation type - it is called from query or insert method
Everything looks good - just review and done!

OperationMetrics keeps a single constructor, OperationMetrics(ClientStatisticsHolder,
OperationType), and OperationType loses its UNKNOWN constant. Metrics are created by
the client, which always knows whether it runs a query or an insert, and the
constructor takes an internal type, so there is no caller that does not know the kind.

A null kind is rejected instead of being read as UNKNOWN.
@polyglotAI-bot

Copy link
Copy Markdown
Collaborator Author

Both items of the review are done, pushed as 6d5dc4c0c.

"remove operation type UNKNOWN because we always know operation type"OperationType is now QUERY and INSERT only. All three call sites (Client POJO insert, stream insert, query) already passed a literal kind, so nothing produced UNKNOWN; the constant only existed as the fallback of the constructor that is now gone.

"There should be only one constructor" — answered in the thread: OperationMetrics keeps only OperationMetrics(ClientStatisticsHolder, OperationType), and a null kind is rejected rather than defaulted.

One consequence worth naming: the removed constructor shipped in 0.10.x, so it is a source-breaking change for anyone who called it. It takes an internal type (com.clickhouse.client.api.internal.ClientStatisticsHolder), so that should be nobody, but I recorded it under ### Breaking Changes in CHANGELOG.md and added a section to docs/releases/0_11_0.md. Say the word if you would rather not carry a breaking-change note for it.

Verification: client-v2 587 unit tests, 0 failures (586 before; the test that pinned the UNKNOWN default is replaced by one that pins the kind round-trip and one that pins the null rejection — no existing test was edited or weakened), the 4 OTel integration tests pass against a live server, and the full reactor mvn -Dj8 -DskipTests install builds.

Still open from earlier rounds, if you want to close them out: url.full on request spans (thread left unresolved — it needs an SPI decision), whether the no-argument constructor should keep its lazy GlobalOpenTelemetry read, and whether recordFailure should also be split per operation kind.

@sonarqubecloud

Copy link
Copy Markdown

@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 6d5dc4c. Configure here.

@chernser
chernser merged commit ab08ae6 into main Aug 26, 2026
39 of 43 checks passed
@chernser
chernser deleted the polyglot/client-v2-opentelemetry-span-recorder branch August 26, 2026 19:08
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.

3 participants