clickhouse-java v0.10.0-rc1
clickhouse-java v0.10.0-rc1
Breaking Changes
-
[jdbc-v2] The driver no longer hardcodes the server settings
async_insert=0andwait_end_of_query=0on every JDBC connection. This unblocks two scenarios that previously did not work: overriding these settings per connection or per statement, and using the driver against read-only profiles that disallowSETTINGSoverrides. There are two consequences:- The driver now follows the server-side defaults for these settings (note: starting with ClickHouse 26.3,
async_insertdefaults to1). Removing the explicitwait_end_of_query=0is a no-op against server defaults but lets users opt in towait_end_of_query=1. - The row count returned by
java.sql.Statement.executeUpdate(java.lang.String)(and the matchingPreparedStatementmethod) is no longer guaranteed to be accurate for INSERT statements when the server runs them asynchronously, and parsing/data errors in the INSERT body may not surface synchronously as aSQLException. Previously these were accurate because inserts were forced to be synchronous (see also https://github.com/ClickHouse/ClickHouse/issues/57768). To restore the previous behavior, setasync_insert=0(orwait_for_async_insert=1) per connection as server setting. Read more about asynchronous insert: https://clickhouse.com/docs/optimize/asynchronous-inserts.
(https://github.com/ClickHouse/clickhouse-java/issues/2652, https://github.com/ClickHouse/clickhouse-java/issues/2825)
- The driver now follows the server-side defaults for these settings (note: starting with ClickHouse 26.3,
-
[client-v2]
Client.Builder#build()now throwsClientMisconfigurationExceptioninstead ofIllegalArgumentExceptionfor authentication and SSL misconfiguration (missing credentials, conflicting authentication methods, missing client certificate when SSL authentication is enabled, and trust store used together with a client certificate). Callers that relied on catchingIllegalArgumentExceptionfrombuild()for these cases must catchClientMisconfigurationException(which extendsRuntimeExceptionviaClientException). (https://github.com/ClickHouse/clickhouse-java/pull/2812) -
[client-v2] Combining
setUsername(...)+setPassword(...)with a customAuthorizationHTTP header (httpHeader(HttpHeaders.AUTHORIZATION, ...)) now fails atClient.Builder#build()withClientMisconfigurationExceptionunless HTTP Basic authentication is explicitly disabled viauseHTTPBasicAuth(false). Previously this combination was accepted and the customAuthorizationheader overrode the user/password at request time. (https://github.com/ClickHouse/clickhouse-java/pull/2812) -
[client-v2] The
access_tokenconfiguration property (set viaClient.Builder#setAccessToken(String)or directly throughsetOption) is now actually applied to outgoing requests as theAuthorizationHTTP header value verbatim. Previously the value was stored underaccess_tokenbut never sent on the wire, so providing it alone had no effect on authentication. Callers must include the scheme prefix themselves (e.g.setAccessToken("Bearer <token>")), or useuseBearerTokenAuth(String)which prependsBearerautomatically. (https://github.com/ClickHouse/clickhouse-java/pull/2812) -
[client-v2]
Client.Builder#useBearerTokenAuth(String)now stores the bearer token under theaccess_tokenconfiguration key (with theBearerprefix) instead of writing it directly intohttp_header_authorization. The HTTP wire format is unchanged, but the token is no longer observable throughClient#getReadOnlyConfig()under thehttp_header_authorizationkey. (https://github.com/ClickHouse/clickhouse-java/pull/2812) -
[client-v2] Fixed inconsistent use of
executionTimeoutparameter inClientcomponent. The timeout was previously set in milliseconds but mistakenly retrieved and used in seconds in some places. Now it correctly uses milliseconds consistently. (https://github.com/ClickHouse/clickhouse-java/issues/2358)
New Features
-
[jdbc-v2, client-v2] Implemented SSL modes configuration. Now it is possible to set
ssl_modetoDISABLED,TRUST,VERIFY_CAandSTRICT. Note for V1 users:NONEis supported only by JDBC driver and mapped toTRUST. Please migrate to the new naming.- Examples for client-v2 https://github.com/ClickHouse/clickhouse-java/blob/main/examples/client-v2/src/main/java/com/clickhouse/examples/client_v2/SSLExamples.java
- Examples for jdbc-v2 https://github.com/ClickHouse/clickhouse-java/blob/main/examples/jdbc/src/main/java/com/clickhouse/examples/jdbc/SSLExamples.java (https://github.com/ClickHouse/clickhouse-java/pull/2874, https://github.com/ClickHouse/clickhouse-java/issues/2389, https://github.com/ClickHouse/clickhouse-java/issues/2309, https://github.com/ClickHouse/clickhouse-java/issues/2819)
-
[jdbc-v2, client-v2] (beta) Implemented standalone readers for
JSONEachRowto provide scaffold for reading this format. Additionally, it gives a way to mapJsoncolumns to custom types using JDBC driver. See examples in https://github.com/ClickHouse/clickhouse-java/tree/main/examples/jdbc-v2-json-processors and https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client-v2-json-processors. (https://github.com/ClickHouse/clickhouse-java/pull/2871) -
[client-v2] Added
SessionAPI to encapsulate and manage ClickHouse session settings (session_id,session_check,session_timeout,session_timezone) as a reusable object. TheSessioninstance can be applied to any request settings usingapplyTo(), and session state can be cleared viaclearSession(). Additionally, addedresetOption(String)toInsertSettings,QuerySettings, andCommonSettingsto allow removing specific settings. Settings explicitly set tonullwill not be sent to the server, which is useful for overriding global settings. (https://github.com/ClickHouse/clickhouse-java/pull/2810) -
[client-v2] Added runtime credential update APIs on
Client:updateUserAndPassword(String, String),updateAccessToken(String), andupdateBearerToken(String). Subsequent requests on the sameClientinstance use the new credentials without rebuilding the client. The authentication method is fixed at construction time; calling a runtime updater that does not match the configured method throwsClientMisconfigurationException. Seedocs/authentication.mdfor details and migration guidance. (https://github.com/ClickHouse/clickhouse-java/pull/2812) -
[jdbc-v2] Added
cluster_nameconfiguration property to specify a target cluster for statements likeKILL QUERYthat require anON CLUSTERclause to execute across all nodes. (https://github.com/ClickHouse/clickhouse-java/issues/2837) -
[client-v2, jdbc-v2] Added support for ClickHouse
Geometrytype for ClickHouse25.11+, whereGeometrychanged from aStringalias toVariant(Point, Ring, LineString, MultiLineString, Polygon, MultiPolygon)(client still compatible with older versions). Includes client read/write handling and JDBC type mapping for retrieving and inserting geometry values. Current writes infer the target geometry variant from array nesting depth, soRingvsLineStringandPolygonvsMultiLineStringare not yet distinguishable through the genericGeometrywrite path. (https://github.com/ClickHouse/clickhouse-java/pull/2815) -
[jdbc-v2]
ResultSet#getObject(int|String, Map<String, Class<?>>)now accepts ClickHouse type names as map keys in addition to the JDBCSQLTypenames it has always accepted. Only unwrapped type names are used for the lookup —Nullable(...)andLowCardinality(...)wrappers are stripped and do not affect resolution, so a key like"Int32"matches bothInt32andNullable(Int32)columns; keys like"Nullable(Int32)"are not recognized. Lookup order is theClickHouseDataTypeenum name (e.g."Int32","String","DateTime") then the JDBCSQLTypename (e.g."INTEGER","VARCHAR","TIMESTAMP"); a missing entry leaves the value uncoerced. The feature is supported for primitive ClickHouse types only —Array,Tuple,Map,Nested, and geometry types are not supported and continue to be returned in their native form regardless of the user-supplied map. Existing maps keyed only by JDBCSQLTypenames continue to work unchanged. (https://github.com/ClickHouse/clickhouse-java/pull/2865)- [jdbc-v2] Added support of custom mapping for JDBC types. Mainly used in cases when big integers should be
presented as string. Use
DriverProperties.JDBC_TYPE_MAPPINGS(jdbc_type_mappings) and set needed type mapping askey=value[,]list (For example,Int32=Long,UInt64=String). Deprecation notice: V1 propertytypeMappingsis supported but will be removed. Please migrate to the new property. (https://github.com/ClickHouse/clickhouse-java/issues/2858)
- [jdbc-v2] Added support of custom mapping for JDBC types. Mainly used in cases when big integers should be
presented as string. Use
Improvements
- [jdbc-v2, client-v2] Added support of hostnames with underscore (
_) in them. Now it is possible to specify endpoint likech_db_01. This is mostly used in k8s environment. (https://github.com/ClickHouse/clickhouse-java/issues/2792, https://github.com/ClickHouse/clickhouse-java/issues/2753)
Updated Dependencies
- [tests] Bump org.postgresql:postgresql from 42.6.1 to 42.7.11
Docs & Examples
-
[client-v2] Added example of working with
Apache Arrowlibrary using client. (https://github.com/ClickHouse/clickhouse-java/pull/2820) -
[repo] Added a contribution guide. Please review and send us your feedback. (https://github.com/ClickHouse/clickhouse-java/pull/2859)
Bug Fixes
-
[jdbc-v2, client-v2] Fixed error handling for responses that not a ClickHouse error, like
404response. (https://github.com/ClickHouse/clickhouse-java/issues/2803) -
[jdbc-v2, client-v2] Fixed setting
nullas password. Previously it was converted tonullliteral. Still we recommend passing empty string. (https://github.com/ClickHouse/clickhouse-java/pull/2809) -
[jdbc-v2, client-v2] Fixed
ClickHouseBinaryFormatReader::getBigDecimalsilently truncating big integer. (https://github.com/ClickHouse/clickhouse-java/issues/2748) -
[jdbc-v2, client-v2] Fixed handling
NULLvalues toVariantandDynamiccolumns. Previously indicator ofNULLwas not set and read. (https://github.com/ClickHouse/clickhouse-java/issues/2789, https://github.com/ClickHouse/clickhouse-java/issues/2791) -
[jdbc-v2] Fixed
Statement.cancel()throwingSESSION_IS_LOCKEDwhen the statement was running inside a ClickHouse session. The driver now acceptssession_id,session_check, andsession_timeoutas first-class connection properties and correctly suppresses them when issuing aKILL QUERYduring cancellation. This ensures the cancellation request runs outside the session and no longer contends with the running query for the session lock. (https://github.com/ClickHouse/clickhouse-java/issues/2690, https://github.com/ClickHouse/clickhouse-java/issues/2881) -
[jdbc-v2] Added option to specify cluster name for operations on cluster. One of them is
KILL QUERY .. ON CLUSTER <cluster_name>. UseDriverProperties.CLUSTER_NAME(jdbc_cluster_name) to define name of the cluster to be used in such queries. (https://github.com/ClickHouse/clickhouse-java/issues/2837) -
[jdbc-v2, client-v2] Fixed writing nullable marker for nested
Tupleand `Map values. (https://github.com/ClickHouse/clickhouse-java/issues/2721)
Source ClickHouse/clickhouse-java ·
v0.10.0-rc1· 2026-07-03 · upstream release
Mirrored verbatim for indexing. All rights belong to the upstream project.
Release notes are published by the upstream project and mirrored here for indexing. All rights belong to their authors.