- [jdbc-v2] Added
cluster_nameconfiguration property to specify a target cluster for statements likeKILL QUERYthat require anON CLUSTERclause to execute across all nodes. (#2837)
- [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. (#2358)
- [client-v2] Added
Records#getSchema()to expose table schema metadata even when query result is empty. (#2777)
-
[jdbc-v1, jdbc-v2] Fixed type mapping/conversion behavior for large unsigned integer values (issue #2779), including related test coverage updates. (#2779)
-
[jdbc-v2] Fixed off-by-one bug in
ArrayResultSet#next()that could returntrueone extra time and then fail withSQLException: No current row. (#2790) -
[jdbc-v2] Fixed handling of malformed
SELECT-like queries (for example,SELECT a, FROM table): previously, the driver could fail to read returned data when query type was not inferred before execution; now it detects a returned result set at runtime from the server response and reads it correctly. (#2784)
-
[repo] Upgraded
at.yawk.lz4:lz4-javafrom1.10.2to1.10.4to pick up native performance fixes. (#2778) -
[repo] Upgraded
com.fasterxml.jackson.core:jackson-corefrom2.17.2to2.18.6injdbc-v2. (#2767) -
[repo] Upgraded
com.fasterxml.jackson.core:jackson-corefrom2.17.2to2.18.6inexamples/client-v2. (#2766)
-
[client-v2]
Client.Builder#build()now throwsClientMisconfigurationExceptionwhen an unknown configuration property is passed. Previously, unknown properties were silently ignored what caused unexpected behaviour and problems. To restore the old behavior, addignore_unknown_config_key=trueto the client properties. JDBC driver-only properties (e.g.ssl) are no longer forwarded to the underlying client. (#2658) -
[client-v2]
Date/Date32columns are now decoded asLocalDatewithout any timezone adjustment. Previously,Datevalues could be returned asZonedDateTime. Applications that need aZonedDateTimemust construct it from the returnedLocalDateusing their own timezone context. More read about it - https://clickhouse.com/docs/integrations/language-clients/java/jdbc_date_time_guide (#2727)
-
[client-v2] Added option to send query parameters in the HTTP request body using multipart form encoding. Enabled via the new
client.http.use_form_request_for_queryconfiguration property (orClient.Builder#useHttpFormDataForQuery()). Useful when query parameters would exceed URL length limits. (#2324) -
[client-v2]
QueryResponse,InsertResponse, andCommandResponsenow exposegetServerDisplayName()to retrieve the value of theX-ClickHouse-Server-Display-NameHTTP response header. A full map of whitelisted response headers is accessible viagetResponseHeaders(). (#2347) -
[client-v2] Added
getObjectArray()toClickHouseBinaryFormatReaderandGenericRecordto readArray(...)columns asObject[], including recursive support for nested arrays.getStringArray()now also handlesArray(Enum*)by returning enum names. (#2738) -
[jdbc-v2] Added support for reading and writing
byte[]forString/FixedStringcolumns.PreparedStatement#setBytes()encodes the value as a ClickHouseunhex()expression to preserve raw bytes;ResultSet#getBytes()returns the UTF-8 bytes of the string value. (#2734)
-
[docs] Added a document that explains how driver handles different date/time values.
-
[client-v2, jdbc-v2] Fixed writing
Date/Time/Timestampvalues so that timezone conversions are performed explicitly. Previously, timezone-naïve encoding caused day-shift and precision bugs, especially when aCalendaror non-default JVM timezone was in use. (#2701, #2065, #2496, #1220, #1117, #1048, #2381, #1735, #2542, #2557) -
[client-v2, jdbc-v2] Fixed reading
Date/Time/DateTimevalues to be consistent and correct.Date/Date32are now decoded asLocalDate(no timezone), whileTime/Time64are decoded as UTC-basedLocalDateTime. NewgetLocalTime()API added to readers forLocalTimeaccess. Reading date/time fromDynamicandVariantcolumns is also fixed. (#2727) -
[jdbc-v2]
DatabaseMetaDataImpl#getTypeInfo()now returns type information in deterministic alphabetical order, matching v1 driver behavior. (#2733)
-
[jdbc-v2] Fixed SQL parser failing to handle ClickHouse keywords used as table names or column aliases (e.g.
AS value,FROM date). Both the ANTLR4 and JavaCC parsers now maintain a list of non-reserved keywords allowed in identifier positions. Also fixed parsing ofDESCRIBE (SELECT ...),INoperator inSELECT, and bracketed array access in expressions. (#2718) -
[jdbc-v2] Updated SQL parsers to recognise new ClickHouse keywords (
ABI,ARGUMENTS,DRY,LANGUAGE,RETURNS,RUN) introduced in recent ClickHouse HEAD builds. Previously, queries using these keywords as identifiers would fail to parse. (#2761) -
[jdbc-v2] Fixed SQL parser failing on statements containing the
^(caret) operator, such astoJSONString(data.^header_index). A newCARETtoken is now recognised and allowed in dotted identifier chains. (#2768)
-
[jdbc-v2] Fixed
DataTypeConvertercausing NPE when converting nested arrays to strings (e.g.ResultSet#getString()on anArray(Array(...))column). The converter is now re-entrancy-safe. Previously was throwingNullPointerException. (#2723) -
[client-v2, jdbc-v2] Fixed conversion of multi-dimensional
List/array values into Java arrays. Child array dimensions are now calculated correctly from the parent depth level. Previously, convertingList<List<T>>or similar structures produced incorrect results. (#2741) -
[client-v2] Fixed binary array decoding when the first element of an array is an empty
MaporList. Previously, this caused a type mismatch error during array population. (#2499, #2657, #2703)
-
[jdbc-v2] Fixed
DatabaseMetaDataImpl#getJDBCMajorVersion()andgetJDBCMinorVersion()returning the ClickHouse driver version instead of the supported JDBC specification version. Now correctly returns4and2(JDBC 4.2). (#2736) -
[jdbc-v2] Added mapping for all known ClickHouse table engines to JDBC table types. Added
MATERIALIZED VIEWas a new table type.getTables()now correctly reports remote/external engine tables that were previously invisible. (#2664) -
[jdbc-v2] Fixed
NullPointerExceptionin JDBC type metadata for columns of typeMap,IPv4,IPv6,UUID,BFloat16,Decimal256,Geometry, allInterval*types,JSON,LowCardinality,Nullable,Variant,Dynamic, and others. Previously these types had no Java class mapping. (#2711) -
[jdbc-v2] ClickHouse server error codes are now propagated to
SQLException#getErrorCode(). Previously,SQLExceptionwas created without the vendor error code, making it impossible to distinguish error types programmatically. (#2717) -
[client-v2] Fixed
max_execution_timenot being sent correctly to the server. Previously, it was treated as a client option and ignored by ClickHouse; it is now transmitted as a server setting. (#2750) -
[client-v2] Fixed
hasValue(columnName)throwing an exception when the column name does not exist. Previously, referencing an unknown column or an out-of-range index viahasValue()would throw; it now returnsfalse. (#2755) -
[jdbc-v2] Fixed
PreparedStatementreporting missing parameters using 0-based indices in the error message. JDBC parameter positions are 1-based; the error message now reflects this correctly. (#2749) -
[jdbc-v2] Ported legacy JDBC v1 connection properties (
CUSTOM_HTTP_PARAMS,CUSTOM_SETTINGS,HTTP_CONNECTION_PROVIDER,REMEMBER_LAST_SET_ROLES,USE_SERVER_TIME_ZONE_FOR_DATES) to JDBC v2. Required for integrations that share JDBC v1/v2 configuration code.custom_http_paramsandcustom_settingsvalues are converted to server settings automatically. (#2757) -
[client-v2, jdbc-v2] Fixed
custom_-prefixed configuration properties not being forwarded to the server as custom settings when using thecustom_prefix. Also fixed driver-only properties (e.g.ssl) being incorrectly forwarded to the HTTP client. (#2658)
Release is aimed to address potential security risk in one of the dependencies (see below). We strongly recommend to upgrade.
- [repo] - upgraded
lz4-javato1.10.2. Previously used version had a vulnerability https://www.cve.org/CVERecord?id=CVE-2025-66566. (#2706) - [repo] - upgraded
commons-lang3to3.20.0. Previously used version had a vulnerability https://www.cve.org/CVERecord?id=CVE-2025-48924. (#2696)
- [jdbc-v2] - support of dot notation for table names without quotes. (#2650)
- [client-v2] Log durations in ISO-8601 duration format (#2660)
- [jdbc-v2] Added support for
getResultSet()method in Array data types. (#1545, #2683) - [jdbc-v2] Added handling for
TimeandTime64data types in JDBC. (#2682)
- [client-v2] Fixed reading columns of
Arraywith component typeVariant. For example,Array(Variant(String, Int32)). (#2602) - [jdbc-v2] Fixed backward compatibility for
getPrimaryKeys()method. (#2654) - [jdbc-v2] Fixed array conversion issues with multidimensional arrays and nested arrays. (#2457)
- [jdbc-v2] Fixed backward compatibility issues with older ClickHouse versions by replacing
::cast operator withCASTfunction in prepared statements. Fixed issue with reading database version on older versions. (#2654, #2227) - [jdbc-v2] Reviewed and fixed database metadata support flags and return values. (#2520, #778, #2519)
- [jdbc-v2] Added verification tests for issues #1999, #1015, #2155 (#2659)
- [client-v2] Added support for different compression algorithms when HTTP compression is enabled. (#2645)
- [client-v1] Fixes issue linked to a enabled by default HTTP compression in ClickHouse 25.10. (#2636)
-
[jdbc-v2] SQL parser from v1 is ported to v2 to address multiple issues with SQL parsing. The ANTLR4-based parser is still an option and will be developed further. The main difference between parses is completeness of their grammar: JavaCC grabs only needed information and skips parsing of the rest (what makes it work for most cases) while ANTLR4 has more complete grammar and can detect type of some complex statements more accurate than JavaCC. To use it set
com.clickhouse.jdbc.DriverProperties#SQL_PARSERtoANTLR4. (#2579). This fixes issue: -
[repo] New artifact
clickhouse-jdbc-alladded to address issue when maven package qualifiers may not be used. This artifact should is a copy ofclickhouse-jdbc:allbut should be used only when required. (#2625)
- [client-v2] Added
getShortArray()andgetStringArray()toClickHouseBinaryFormatReader. (#2604) - [client-v2] Added
result_rowsandelapsed_timeto summary object. (https://github.com/ClickHouse/clickhouse-java/pull/1633/files)
- [jdbc-v2] Fixed issue with
maxRowsinStatementwhen additional settings were used to limit result set size. It caused problems with read-only users because such users may not change settings in most cases. Now whenmaxRowsis set thenResultSetwill skip extra rows. (#2582) - [jdbc-v2] Fixed issue with driver version. Previously version of a library was converted to minor and major version.
But this approach doesn't work well with
0.9.xversions. Now major and minor versions are combined by shifting major. Patch version becomes a minor version. (#2410) - [jdbc-v2, client-v2] Fixed converting different data types to a string. For example, there was an issue with IP
address when
toString()was used and returned\0.0.0.0instead of0.0.0.0. (#2575) - [jdbc-v2] Fixed issues around spatial data (GEO types). (#2577)
- [client-v2] Fixed issue with current user name. If user name is set then it will be used event after reading server context. (#2247)
- [client-v2] Fixed issue with network timeout settings when default value failed to be cast to Long. (#2597)
- [jdbc-v2] Fixed getting metadata for nullable columns. (#2586)
- [jdbc-v2, client-v2] Fixed issues related to reading JSON data type. Fixed reading JSON columns with arrays. Previously was causing exceptions like
com.clickhouse.client.api.ClientException: Unsupported data type with tag 101 at ...(#2598, #2593, #2613, #2102) - [client-v2] Fixed configuration parameter type for
socket_lingerto match documentation. (#2524) - [client-v2] Fixed handling exceptions in http client code. Now response object is always closed to prevent connection leaking. (#2615)
- [jdbc-v2, client-v2] Fixed issue with duplicate column names in a result set. (#2459, #2336)
- [jdbc-v2] Fixed ANTLR4 parse issue with
filterclause along with aggregate function. (#2631)
- [jdbc-v2]
ResultSetImpl.getObject()handlesjava.time.Instant
- [jdbc-v2] Classes
com.clickhouse.jdbc.ClientInfoPropertiesandcom.clickhouse.jdbc.DriverPropertiesmoved to public API. (#2521) - [jdbc-v2] Implemented
isBeforeFirst,isAfterLast,isFirst,isLastmethods forResultSetandResultSetMetaData. Improved test coverage forResultSetImpl. (#2530) - [jdbc-v2] Implemented
createArrayandcreateStructmethods forConnectioninterface. MethodcreateStructshould be used to createTuplevalues andcreateArrayto create various arrays. (#2523) - [jdbc-v2] Implemented
setNetworkTimeoutofConnectioninterface. Used to fail fast when network operation fails. Related to stale connection problem. (#2522) - [client-v2] Added support for JSON with predefined paths. Previously columns with definition like
JSON(a string, b.c Int32)were not supported. (#2531)
- [jdbc-v2] Fixed issue creating array of tuples with
createArraymethod ofConnectioninterface. (#2360) - [jdbc-v2] Fixed issue with reading nested arrays. (#2539)
- [jdbc-v2] Fixed issue with not shaded antlr4-runtime dependency. Potential problem for Apache Spark users. (#2553)
- [jdbc-v2] Fixed issue with parsing CTE for prepared statement. (#2551)
- [jdbc-v2] Fixed issue with parsing SQL containing view parameters. (#2547)
- [jdbc-v2] Fixed issue with
InsertSettingswhen two concurrent insert operations sharing same settings object may be insert wrong columns or to a wrong table. (#2550) - [jdbc-v2] Fixed issue with batch insert when it is not cleared after execution. Now batch is cleared after execution even on failure. (#2548)
- [jdbc-v2] Fixed
DatabaseMetadataImplto return result set with defined by spec structure. Resolves issue for many database tools relying on metadata. (#2396) - [jdbc-v2] Fixed
DatabaseMetadataImplto return empty result set where appropriate. (#2517) - [jdbc-v2] Fixed issue with verbose logging. (#2148)
- [client-v2] Fixed issue with reading JSON with predefined paths. (#2462)
- [client-v2] Added option to set SNI for SSL connections. See
com.clickhouse.client.api.Client.Builder.sslSocketSNI(#2467) - [client-v2, jdbc-v2] Added support for
TimeandTime64data types. (#2487) - [client-v2] Added utility methods to format
Instantto a DB DateTime format. Seecom.clickhouse.client.api.DataTypeUtils.formatInstant(java.time.Instant, com.clickhouse.data.ClickHouseDataType)(#2501, #2456)
- [client-v2] Improved exceptions and error handling. The
com.clickhouse.client.api.ClickHouseExceptionbecame a root forServerExceptionandClientException.com.clickhouse.client.api.ClickHouseException.isRetryableis added to determine if exception caused in a retriable state. It means that catching such exception application may repeat operation to fix a problem. (#2453) - [client-v2] Improved configuration handling. (#2470)
- [client-v2] Custom type hint for the client to make
ReaderandGenericRecordreturn specific types. For example, collection instead ofArray. (#2476) - [client-v2] Added default port for HTTP and improved endpoint string validation - only one allowed. (#2489)
- [client-v2] Improved handling error response. (#2511)
- [client-v2] Fixed metrics to be parsed as Long to avoid integer overflow. Especially for elapsed time in nanos. (#2465)
- [client-v2] Fixed a bug with passing some server settings from JDBC to the Client. (#2359)
- [jdbc-v2] Fixed
DatabaseMetadatato return correct column type. (#2475) - [jdbc-v2] Fixed problem with JDBC URL when Database names that include dash
-were parsed wrong. (#2463) - [jdbc-v2] Fixed problem with nested arrays. Previously
ArrayValueobject was returned as element of a nested array. After the fix array values contain primitive types. (#2464, #2340) - [jdbc-v2] Fixed JDBC Connection's
isValidmethod returningtrueall the time. (#2472) - [client-v2] Fixed problem with not closed response object when exception happens. That fixes connections leaking. (#1741)
- [jdbc-v2] Fixed a set of issue in
StatementImpl. (#2414) - [jdbc-v2] Fixed a set of issues in
PreparedStatementImpl. (#2418) - [jdbc-v2] Fixed multiple issues linked to parsing statements in JDBC. (#2450, #2451, #2461, #2500, #2493, #2478)
- [jdbc-v2] Fixed result set returning not a DB compliant date/time format. (#2408, #2448)
- [repo] Artifacts
clickhouse-jdbc:http,clickhouse-jdbc:shaded-all,clickhouse-jdbc:shadedare not published anymore. Useclickhouse-jdbc:allinstead. It contains all required shaded libraries exceptorg.slf4j:slf4j-apibecause it may not be shaded. - [repo] Artifacts
jdbc-v2:all,jdbc-v2:http,jdbc-v2:shadedare not published anymore becausejdbc-v2is part ofclickhouse-jdbc:all.
- [jdbc-v2] Fixed parsing SQL with alias in
FROMclause when alias name is a keyword (#2427) - [client-v2] Fixed the issue when parameters are not passed if timeout is set. (#2436, #2096)
- [jdbc-v2] Fixed parser logging issue. Now parser uses same logger as the driver. (#2428)
- [jdbc-v2] Fixed parsing
CREATE USERstatements. Now parser recognises it correctly. (#2398) - [jdbc-v2] Fixed parsing different CTEs statements. (#2431, #2391, #2443)
- [jdbc-v2] Fixed parsing interval values. (#2429)
- [repo] Fixed running unit/integration tests in the CI. (#2430)
- [jdbc-v2] Fixed parsing parameters when function is in back quotes. (#2422)
- [jdbc-v2] Fixed
ResultSet#findColumnalways returning0. (#2375)
- [client-v2] Move all default values to
ClientConfigurationPropertiesenum. (#2269)
- [client-v2] Updated documentation of the configuration parameters and how to set server settings and custom HTTP headers.
- [jdbc-v2] Now using Antlr4 to parse SQL statements to get meta information about it. Invalid SQL still possible to execute if logic able to get all required information. (#2351)
- [jdbc-v2] Now possible to use
RowBinaryWriterif enabled by propertycom.clickhouse.jdbc.internal.DriverProperties.BETA_ROW_BINARY_WRITER. This works well for batches. Single statements may get no benefits. (#2316)
- [jdbc-v2] Fixed parsing prepared statement arguments. (#2348)
- [jdbc-v2] Fixed parsing role name when it contains
-. (#2325) - [jdbc-v2] Fixed failure when
INSERTdoesn't containVALUES. (#2283) - [jdbc-v2] Fixed parsing
INSERTstatement whenVALUESis in lower case. (#2354) - [client-v2] Fixed NPE when async operation is request while client was built without an executor. In this case default JVM executor will be used. (#2355)
- [client-v2, jdbc-v2] Fixed conversion of IP addresses. When IPv4 stored as IPv6 it is correctly converted
to
Inet6Address. Similar problem fixed for JDBC. (#2342) - [jdbc-v2] Fixed changing DB schema (DB name) on connection when
USEstatement executed. (#2137) - [client-v2] Fixed serializing POJO with primitive
booleanfields. (#2248)
- [jdbc-v2] Added debug output for final SQL. (#2249)
- [client-v2] Fixed creating TableSchema for materialized views. It resolves issues with POJO serde. (#2118, #2025)
- [client-v2, jdbc-v2] Fixed handling
NullableinsideSimpleAggregateFunctioncolumns. (#2110) - [jdbc-v2] Fixed problem with server info request. It is fetched now when timezone of the server is set. (#2191)
- [jdbc-v2] Fixed null response for
getIndexInfo(). Empty Result Set is returned. (#2286) - [jdbc-v2] Fixed wrong
falseresponse inDataBaseMetadata.supportsBatchUpdates(). Returnstruenow. Please note that no update is supported for result sets. - [jdbc-v2] Fixed handling UUID data type in PreparedStatement. (#2327)
- [jdbc-v2] Fixed unsigned integer type matching.
UInt8,UInt16,UInt32,UInt64,UInt128,UInt256are presented asshort,int,long,BigInteger,BigInteger,BigIntegercorrespondingly. SQLType for them isOTHERbecause JDBC (as well as Java) doesn't provide good mapping for unsigned integers. (#2333) - [jdbc-v2] Disallowed to call method from
Statementinterface onPreparedStatementinstance according to the JDBC spec. (#2339)
- [jdbc-v2] - JPA example added. (#2301)
- [jdbc-v2] Added implementation of
ResultSetMetaData.getColumnClassName()to return information about class name of the value stored in a result. (#2112) - [client-v2] Fixed NPE when
Client.queryAllused withINSERTstatement because internallycolumnsvariable was accessed and was null. (#2150) - [jdbc-v2] Fixed NPE when
ssl=truewas passed via an connection URL. (#2206) - [jdbc-v2] Fixed sending correct driver version. Problem occurs because context classloader had no access to a resource file with versions. (#2245)
- [jdbc-v2] Fixed incorrect flag for Array values when reading result set. (#2266)
- [jdbc-v2] Fixed parsing parameters in PreparedStatement for cases when '?' is within quotes or similar. (#2290)
- [jdbc-v2] Added implementation for
com.clickhouse.jdbc.PreparedStatementImpl#getMetaData. Complete metadata is returned only after statement execution. Partial metadata is returned before execution of the statement. (#2292) - [jdbc-v2] Fixed
clearParametersinPreparedStatementImplto correctly reset parameters array. (#2299) - [jdbc-v2] Fixed logging. (#2303)
- [jdbc-v2] Fixed metadata field
DATA_TYPEbeingString(#2240)
- [client-v2] Support for native LZ4 compression (#2274)
- [jdbc-v2] Fixed several issues with reading database metadata in JDBC driver. (#2282)
- [jdbc-v2] Fixed settings client name in JDBC. (#2233)
- [client-v2] Fixed reading data from columns defined as
Nullable(FixedString(N)). (#2218) - [jdbc-v2] Fixed SQL parser failure to parse SQL statement with comments (#2217)
- [client-v2] Fixed issue with excessive logging (#2201)
- [jdbc-v2] Fixed handling IP addresses (#2140)
- [jdbc] - Fixed missing LZ4 dependency in shaded package (#2275)
- [jdbc-v2] - Significantly improved performance of JDBC inserts. (#2165)
- [client-v1] - Removed unnecessary object creation and added executor pool configuration (#2164)
- [client-v1] - Deprecated the old client, though it is still available. We've not yet set a date for its removal, this more serves as a head's up.
- [client-v2] - Added support for Variant Data Type for RowBinary format. Can be read into a POJO or using a reader. Writing is supported only for POJO. (#2130)
- [client-v2] - Added support for Dynamic Data Type for RowBinary format. Can be read into a POJO or using a reader. Writing is supported only for POJO. (#2130)
- [client-v2] - Added support for JSON Data Type for RowBinary format. Can be read into a POJO or using a reader. Writing is supported only for POJO. (#2130)
- [client-v2] - Added support for
ZonedDateTimein POJO serde. (#2117) - [client-v2] - Added suport for micrometer metrics for Apache HTTP client connection pool. It is now possible to get metrics registered
in micrometer registry by calling
com.clickhouse.client.api.Client.Builder.registerClientMetrics(registry, groupName). (#1901)
- [client-v2] - Fixed
getTableSchema(tableName, databaseName)now it doesn't ignore database name. (#2139) - [client-v2] - Fixed
returnGeneratedValuesto not throw an exception. Keep in mind that ClickHouse doesn't support returning anything in response forINSERTstatements. This change was done just to make client usable with certain frameworks. (#2121) - [jdbc-v2] - Fixed changing database by
USEstatement. (#2137) - [jbdc-v2] - Fixed
ResultSetMetadata.getColumnClassName()to return null instead of throwing exception. This change is done only to allow certain frameworks work with the client. (#2112) - [jdbc-v2] - Fixed using statements with
WITHin JDBC v2. Previously was causing NPE. (#2132) - [repo] - Fixed failing Test in Windows when attempting to locate files with reserved characters in the file path. (#2114)
- We've updated
ClickHouseDriverandClickHouseDataSourceto default to using the new (jdbc-v2) implementation of the JDBC driver. Settingclickhouse.jdbc.v1=truewill revert this change.
jdbc-v2- Removed support for Transaction Support. Early versions of the driver only simulated transaction support, which could have unexpected results.jdbc-v2- Removed support for Response Column Renaming.ResultSetwas mutable - for efficiency sake they're now read-onlyjdbc-v2- Removed support for Multi-Statement SQL. Multi-statement support was only simulated, now it strictly follows 1:1jdbc-v2- Removed support for Named Parameters. Not part of the JDBC specjdbc-v2- Removed support for Stream-basedPreparedStatement. Early version of the driver allowed for non-jdbc usage ofPreparedStatement- if you desire such options, we recommend looking at client-v2.
- [client-v2, jdbc-v2] - Added support for Bearer token authentication like JWT. Now it is possible to specify encoded token while
creating a client and change while runtime using
com.clickhouse.client.api.Client.updateBearerToken. (#1834, #1988) - [client-v2] - Exposed connection pool metrics through Micrometer. It allows to monitor internal connection pool for number of active and leased connections. (#1901)
- [client-v2] - Fixed construction of
User-Agentheader. Prev. implementation usesclass.getPackage().getImplementationVersion()what returns incorrect title and version when library is shaded. New implementation uses build time information from resource files generated while build. (#2007) - [client-v2] - Fixed multiple issues with handling connectivity disruption. Socket timeout is unlimited by default. Added retry on timeout. Added more information to exception message. Please read the issue for more details. (#1994)
- [client-v2] - Client doesn't close provided executor anymore letting application close it instead. (#1956)
- [client-v2] - Removed unnecessary initialization to make startup time shorter. (#2032)
jdbc-v2- pre-release version of upcomingclickhouse-jdbcreplacement. Supports basic functionality, works only withclient-v2. More information will be available after its release
- [repo] Added shaded packages with requires a set of dependencies. Use
allclassified forclient-v2full package. Useshaded-allfor old jdbc driver. - [client-v2] New Data Writer API was added. It allows to gain a control over writing data to low-level output stream.
This API makes it possible to write compressed data directly to server. See
com.clickhouse.client.api.Client#insert(java.lang.String, com.clickhouse.client.api.DataStreamWriter, com.clickhouse.data.ClickHouseFormat, com.clickhouse.client.api.insert.InsertSettings)(#2034)
- [client-v2] Added ability to specify client name. It means
User-Agentwill be filled with proper information (#1948) - [client-v2] Implemented statement parameters for
queryAllandqueryRecordsAPI methods. (#1979) - [client-v2] Implemented string to number conversion. (#2014)
- [client-v1] Added basic auth support for proxies. Now you can specify username/password when connecting via a proxy that requires it with HttpURLConnection and Apache HttpClient.
- [client-v2] Enum columns can be read as string and number. Previously only as number. Now number matching string constant is returned when get as string. (#2028)
- [client-v2] Client will load some server context (timezone, user) right after build. (#2029)
- [jdbc] Fixed default value for
result_overflow_modesetting. (#1932) - [client-v2] Fixed reading float/double values. Previously was prevented by incorrect overflow check. (#1954)
- [client-v2] Fixed issue with enabling client compression. Previously flag was ignore in some cases. (#1958)
- [client-v2] Fixed issue with reading
Array(UInt64)because of incorrect class used to create internal array. (#1990) - [client-v2] Fixed ClickHouseLZ4OutputStream issue of sending empty frame when no data left in uncompressed buffer. (#1993)
- [client-v2] Fix handling
ConnectTimeoutExceptionin retry and wrapping logic. (#2015)
- [JDBC] Fixed
java.lang.NoClassDefFoundError: com/clickhouse/client/internal/apache/hc/core5/http2/HttpVersionPolicy(#1912) - [client-v2] Fixed multiple issues with error message handling. (#1906)
- [client-v2] Fixed primitive types conversion. Now client correctly handles numbers to boolean and vice-versa. (#1908)
- [client-v2] Implemented more friendly number conversion. Now it is possible to convert smaller type to bigger one. It is also possible to convert bigger into smaller if value fits into the range. (#1852)
- [client-v2] Ported a feature that allows to remember DB roles for a client instance. See
com.clickhouse.client.api.Client#setDBRolesfor details. (#1832) - [client-v2] Ported a feature that allows adding comments to a query.
See
com.clickhouse.client.api.insert.InsertSettings#logCommentandcom.clickhouse.client.api.query.QuerySettings#logCommentfor details. (#1836) - [client-v2] Added support for SSL Authentication with client certificates. (#1837)
- [client-v2] Implemented a way to define a custom matching between a column name and a field in a POJO in
Client#registermethod. (#1866) - [client-v1, client-v2] Implemented HTTP Basic authentication and made it a default auth method for HTTP interface. It
was done to address problem with passwords contianing special and UTF8 characters. New configuration option
com.clickhouse.client.http.config.ClickHouseHttpOption.USE_BASIC_AUTHENTICATIONfor client v1 is added. For client v2 usecom.clickhouse.client.api.Client.Builder#useHTTPBasicAuthmethod. (#1305)
- [client] Bumped org.apache.avro:avro version to 1.11.4 (#1855)
- [client] Added links to javadoc for all classes in the README.md (#1878)
- [client-v2] Fixed deserializing nullable columns of
Nestedtype (#1858) - [client-v2] Fixed dependencies needed for compression to work out of the box (#1805)
- [client-v2] Fixed dependency on SNAPSHOT component (#1853)
- [client-v2] Fixed using
scalefrom a column definition when deserializing DateTime64 values (#1851) - [client-v2] Fixed applying database from insert settings (#1868)
- [client-v2] Fixed error handling from server (#1874)
- [client-v2] Fixed SerDe for SimpleAggregateFunction columns (#1876)
- [client] Fixed handling error from server in response with
200 OKstatus. Happens whensend_progress_in_http_headersis requested and query runs for a long time. (#1821) - [jdbc] Fixed incorrect error logging (#1827)
- [client-v2] Fixed handling tuples in arrays (#1882)
- [client-v2] Fixed passing
insert_duplication_tokenthroughInsertSettings. (#1877)
- Following deprecated components are removed:
- clickhouse-cli-client
- clickhouse-grpc-client
- [client-v2] New transport layer implementation is used by default. It is still possible to switch back
using old implementation by setting
com.clickhouse.client.api.Client.Builder#useNewImplementationtofalse. (#1847)
- [client-v2] Now there is an easy way to set custom HTTP headers globally for client and per operation.
See
com.clickhouse.client.api.Client.Builder.httpHeader(java.lang.String, java.lang.String)for details. (#1782) - [client-v2] Now there is a way to set any server settings globally for client and per operation.
See
com.clickhouse.client.api.Client.Builder.serverSetting(java.lang.String, java.lang.String)for details. (#1782) - [client-v2] Added support for writing AggregateFunction values (bitmap serialization). !! Reading is not supported but will be added in the next release. (#1814)
- [r2dbc] Defer connection creation. This allows pool to create a new instance on every subscription, instead of always returning the same one. (#1810)
- [client-v2] Improved reading fixed length data like numbers. It is possible to configure readers to
use pre-allocated buffers to avoid memory allocation for each data row/block. Significantly reduces GC pressure.
See
com.clickhouse.client.api.Client.Builder.allowBinaryReaderToReuseBuffersfor details. (#1816) - [client-v2] New API method introduced to read data directly to a POJO. Deserializers for POJO classes are compiled into bytecode (with help of https://asm.ow2.io/ library) and optimized for each schema. It is great performance boost because data is read without copying it into temporary structures. Code can be optimized by JVM while runtime as SerDe code is implemented without reflection using JVM bytecode. Using bytecode makes handling primitive types without values boxing. (#1794, #1826)
- [client-v2] Optimized reading columns - internally data is read into map of column-values. It is done to allow reading same column more than once. Previously map was cleared each row what caused a lot internal objects creation. Now values are overridden because schema doesn't change between rows. (#1795)
- [client-v2] Added example for Kotlin (#1793)
- [doc] Main documentation on official ClickHouse website is updated. Each client has its own page with detailed information now. Added documentation for the Client V2. See https://clickhouse.com/docs/en/integrations/java.
- [client-v2] Fix for cases when missing operation metrics were causing NPE. (#1846)
- [client-v2] Fix for handling empty result by BinaryFormat readers. (#1845)
- [jdbc] Content of an artifact 'clickhouse-jdbc-{version}-all.jar' is fixed and contains all required classes from
clickhouse-clientandclickhouse-data. (#1842) - [client-v1, jdbc] Endpoints definition parsing fixed to grub properties correctly. Now even properties with key-value pairs are supported. (#1841, #1665)
- Following components will be deprecated and removed in 0.7.0 release:
- clickhouse-cli-client
- clickhouse-grpc-client
- Projects cli-client and grpc-client are excluded from release and build.
- No more builds for non-lts Java versions - no more Java 9 release builds.
- [client-v2]
queryAll()optimized to use less memory (#1779) - [client-v2]
Client.Builder#setClientNetworkBufferSizeintroduced to allow increasing a buffer that is used to transfer data from socket buffer to application memory. When set to >= of send/receive socket buffer size it significantly reduces number of system calls and improves performance. (#1784)
- [client-v2] Client will retry on
NoHttpResponseExceptionwhen using Apache HTTP client. It is useful when close/stale connection is leased from connection pool. No client will retry one more time instead of failing.Client.Builder#retryOnFailuresandClient.Builder#setMaxRetrieswere introduced to configure client behavior. (#1768)
- [client-v2] Correct timezone used when reading DateTime values. Affects how date/datetime values
are read when
session_timezoneis used (#1780) - [client-v2] Fix reading big integers. Previously was causing incorrect values (#1786) (#1776)
- [client-v2] Fix server compressions when using a client instance concurrently (#1791)
- [client-v2] Fix reading arrays as list. Also affected reading nested arrays (#1800)
- [client-v1] Fix handling summary metadata for write operations. Previously was causing empty metadata
- Following components will be deprecated and archived in next release:
- clickhouse-cli-client
- clickhouse-grpc-client
- No more builds for non-lts Java versions - no more Java 9 release builds.
- Lowest supported Java version will be 11.
- Java 11 support will be ended before the end of 2023.
- It is recommended to use Java 21.
- [Client-V1] Fix for handling DateTime without timezone when
session_timezoneis set. Now server timezone is parsed from server response when present (#1464)
- [Client-V1/Apache HTTP] More configuration parameters for connection management. Useful for tuning performance.
(#1771)
- com.clickhouse.client.config.ClickHouseClientOption#CONNECTION_TTL - to configure connection time-to-live
- com.clickhouse.client.http.config.ClickHouseHttpOption#KEEP_ALIVE_TIMEOUT - to configure keep-alive timeout
- com.clickhouse.client.http.config.ClickHouseHttpOption#CONNECTION_REUSE_STRATEGY - defines how connection pool behaves.
If
FIFOis selected then connections are reused in the order they were created. It results in even distribution of connections. IfLIFOis selected then connections are reused as soon they are returned to the pool. Note: only forAPACHE_HTTP_CLIENTconnection provider. - Additionally switched to using LAX connection pool for Apache Connection Manager to improve performance for concurrent requests.
- [Client-V2] Connection pool configuration #1766
- com.clickhouse.client.api.Client.Builder.setConnectionRequestTimeout - to configure connection request timeout. Important when there are no connections available in the pool to fail fast.
- com.clickhouse.client.api.Client.Builder.setMaxConnections - configures how soft limit of connections per host. Note: Total number of connections is unlimited because in most cases there is one host.
- com.clickhouse.client.api.Client.Builder.setConnectionTTL - to limit connection live ignoring keep-alive from server.
- com.clickhouse.client.api.Client.Builder.setConnectionReuseStrategy - to configure how connections are used. Select FIFO to reuse connections evenly or LIFO (default) to reuse the most recently active connections.
- [Client-V2] All operations are now executed in calling thread to avoid extra threads creation.
Async operations can be enabled by
com.clickhouse.client.api.Client.Builder.useAsyncRequests(#1767) - [Client-V2] Content and HTTP native compression is supported now Currently only LZ4 is available. (#1761)
- [Client-V2] HTTPS support added. Required to communicate with ClickHouse Cloud Services. Client certificates are supported, too. (#1753)
- [Client-V2] Added support for HTTP proxy (#1748)
- [Client-V2] Spring Demo Service as usage example (#1765)
- [Client-V2] Examples for using text based formats (#1752)
- [Client-V2] Data is read fully from a stream. Important for Cloud instances (#1759)
- [Client-V2] Timezone from a server response is now used to parse DateTime values (#1763)
- [Client-V1] Timezone from a server response is now used to parse DateTime values (#1464)
- [Client-V1] Changed how
User-Agentstring is generated. NowClickHouse-JavaClientportion is appended in all cases. It is still possible to set custom product name that will be the first part inUser-Agentvalue. (#1698)
- [Client-V1/Apache HTTP] Retry on NoHttpResponseException in Apache HTTP client.
Should be used with causes because it is not always possible to resend request body.
Behaviour is controlled by
com.clickhouse.client.http.config.ClickHouseHttpOption#AHC_RETRY_ON_FAILURE. Works only for Apache HTTP client because based on its specific behavior(#1721) - [Client-V1/Apache HTTP] Connection validation before sending request.
Behaviour is controlled by
com.clickhouse.client.http.config.ClickHouseHttpOption#AHC_VALIDATE_AFTER_INACTIVITY. By default, connection is validated after being in the pool for 5 seconds. (#1722)
- [Client-V2] Fix parsing endpoint URL to detect HTTPs (#1718)
- [Client-V2] Fix handling asynchronous operations. Less extra threads created now. (#1691)
- [Client-V2] Fix way of how settings are validated to let unsupported options to be added (#1691)
- [Client-V1] Fix getting
localhosteffective IP address (#1729) - [Client-V2] Make client instance closeable to free underlying resource (#1733)
- Describe non-executed SELECT queries in prepared statements to provide metadata (#1430)
- Command execution in the client API (#1693)
- Added
com.clickhouse.client.ClickHouseResponseSummary#getQueryId()(#1636) - Added support for SSL for the Client V2
- Added proxy support for Client V2 (#1694)
- Added more examples for Client V2 (#1709)
- Alpha version of the new client API. See example https://github.com/ClickHouse/clickhouse-java/tree/main/examples/client-v2.
- Fix proper handling of ClickHouseResult to release DB connection (#1538
- Fix getting response input stream for binary formats.
- Exception context remove from a message. Server information not present anymore but available thru
com.clickhouse.client.ClickHouseException#getServer(#1677)
- Roles (memorized by client) can be reset with 'SET ROLE NONE' query (#1647)
- MaxBufferSize can be greater than internal MAX value now
- Updated example project to use the latest version of the client
- Added possibility to set client ID in
RefererHTTP Header (#1572) - [HTTP] Persistence of a role after it is set by
SET ROLE <role>
- Change RowBinaryWithDefaults settings. Output is changed from true to false
- Fix fail over for Apache HTTP client. Connect timeout error is not detected correctly
- Fix password logging in DEBUG (#1571)
- Fix handling "NoHttpResponseException" in Apache HTTP client
- Fix param error in ByteUtils#equals in java9
- Not detecting correctly ClickHouse error code
- Fix JDBC read error - Multidimensional empty errors raise a java.lang.ArrayStoreException
- org.apache.commons:commons-compress from 1.23.0 to 1.26.1
- org.postgresql:postgresql from 42.6.0 to 42.6.1
- Fix buffering issue caused by decompress flag not to work when working with HTTP Client.
clickhouse-cli-client package is deprecated from version 0.6.0 and it's going to be removed in 0.7.0. We recommend using clickhouse-client instead.
clickhouse-grpc-client package is deprecated from version 0.6.0 and it's going to be removed in 0.7.0. We recommend using HTTP protocol instead.
- Remove WEB_CONTEXT support - #1512
- Add support in RowBinaryWithDefaults #1508
- Fix faulty node detection in ClickHouseNodes - #1595
- Fix while getting addBatch with an exception drop the all batch #1373
- Fix buffering issue caused by decompress flag not to work #1500
- ClickHouseByteBuffer can no longer be extended
- rename ClickHouseByteUtils methods by removing LE suffix
- change default databaseTerm from schema to catalog
- remove deprecated API load, dump and connect
- remove use_no_proxy settings
- Adding new proxy support #1338
- Add support for customer socket factory #1391
- use VarHandle in JDK 9+ to read/write numbers
- Establish secured connection with custom Trust Store file
- Change default HTTP Client to Apache HTTP client #1421
- Java client threw confusing error when query is invalid.
- JDBC Driver correctly processes
AggregateFunction(Nested(...))columns - Incorrect parameter position
- Fix testing framework to support secured clickhouse server
- ClickHouseStatement.setMirroredOutput() for dumping ResultSet.
- ClickHouseResponse.records(Class<?>) for object mapping.
- Two new options(use_compilation & max_mapper_cache) reserved for future usage.
- Too many socket fds generated by Apache HttpClient.
- NoClassDefFoundError with clickhouse-apache-http-client-jdbc. #1319
- Nested array in tuple array is incorrectly deserialized. #1324
- client certificate password exposure in exception. #1331
- refactor data processors and response classes to ensure input stream remain intact before first read:
- move ClickHouseSimpleRecord to com.clickhouse.data
- stop reading input stream when instantiating ClickHouseDataProcessor
- remove createRecord() method in ClickHouseDataProcessor along with some duplicated code
- disable SQL rewrite for DELETE statement in ClickHouse 23.3+
- Slow when using Apache Http Client. #1320
- ClickHouseResponse.getInputStream may return closed input stream.
- ConcurrentModificationException may occure during deserialization. #1327
- ClickHouseSslContextProvider is not customizable. #1329
- flatten plugin 1.4.1 generated non-sense dependencies.
- replace JavaCC21 with CongoCC
- unable to convert empty string to default value when using text-based data format.
- r2dbc driver does not support most client options. #1299
- incorrect content from Lz4InputStream when using text-based data format #48446
- ClickHouseSqlStatement and *ParserHandler in JDBC driver were refactored to support
compressionandinfilein insert statement.
- centralized configuration for JDBC driver using custom server setting
custom_jdbc_config. - support
BEGIN TRANSACTION,COMMIT, andROLLBACKin JDBC driver. #975 - new options for JDBC driver
- error while converting Nested values to Java maps.
- incorrect algorithm extracted from PEM. #1274
- transaction failure introduced 0.4.0.
- respect node-specific credentials. #1114
- USE statement does nothing. #1160
- executeBatch does not support on cluster anymore. #1261
- changed option names - #1203
- compress_alogrithm -> compress_algorithm
- decompress_alogrithm -> decompress_algorithm
- added source in shaded jar for IDE friendly. #1217
- iterable ClickHouseInputStream, which slightly improved performance of piping. #1238
- ClickHouseOutputStream.transferBytes() is deprecated and it will be removed in 0.5.
- read() and write() methods in ClickHouseClient - connect() is deprecated and it will be removed in 0.5.
- make all dependencies of JDBC driver optional, along with configuration for building native binary. #1247
- incorrect nested array value. #1221
- incorrect nested array values. #1223
- potential endless loop when handling batch update error. #1233
- exception when deserializing Array(FixedString(2)) from RowBinary. #1235
- deserialization failure of Nested data type. #1240 broken serde for Nested, which also impacted JSON. #1242
- fix 64bit bitmap serialization issue. #641, #874, #1141
- gRPC client may complete execution before closing response stream
- throw StreamCorruptedException instead of generic IOException when deserialization failed (mostly due to server error)
- refactored
JdbcTypeMappingto make it extensible. #1075 - removed legacy driver
ru.yandex.*.#1089 - removed most deprecated methods and class members
- refactored data processor(for serialization and deserialization) and added new classes for unsigned types. #1124
- refactored ClickHouseRequest/ClickHouseInputStream/ClickHouseOutputStream to better support compression. #1174, #1189
- extracted
clickhouse-datafromclickhouse-clientalong with new packages. #1197com.clickhouse.config // generic configuration com.clickhouse.data // data processing utilities com.clickhouse.logging // generic logging utility - added jdk17 in pom and changed build instructions
mvn -Dj8 clean install # for jdk8, it was 'mvn clean install' mvn clean install # for jdk17, it was 'mvn -Drelease clean install'
- added R2DBC driver. #914
- enhanced ClickHouseClient for importing and exporting compressed file. #1004
- added new option
custom_settings. #1059 - enhanced
ClickHouseRequestManagerto support query/session ID customization. #1074 - added Apache HTTP Client 5 to support socket options. #1146
- enhanced
clickhouse-grpc-clientto support request chunking and compressiondecompress_alogrithm(request compression):BROTLI[-1,11],BZ2,DEFLATE[0,9],GZIP[-1,9],LZ4[0,18],XZ[0,9],ZSTD[0,22]compress_alogrithm(response decompression):DEFLATE,LZ4,ZSTDNote: typo will be fixed in v0.4.1.
- enhanced
clickhouse-http-clientto support zstd compression for both request and responsedecompress_alogrithm(request compression):LZ4[0,18],ZSTD[0,22]compress_alogrithm(response decompression):BROTLI,BZ2,DEFLATE,GZIP,LZ4,XZ,ZSTDNote: typo will be fixed in v0.4.1.
- added stream-based prepared statement. #1163
- browser-like client name (
select distinct http_user_agent from system.query_log). #1182 - enhanced
ClickHouseRequestby treating input stream andClickHouseWriterequally. #1200
- not able to cancel query when there's session_id. #1035
- overflow error when handling BigInteger and BigDecimal in ClickHouseLongValue. #1040
- not handling SimpleAggregateFunction properly. #1054
- DELETE FROM was rewritten to ALTER TABLE DELETE even when lightweight deletion was enabled. #1063
- forced headless format for inserting. #1073
- missing the verb "be" in error messages. #1137
- write time field data loss precision. #1127
- fixed a few copy-paste error causing problem handling Geo types