- 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.
- [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#setDBRoles
for details. (#1832) - [client-v2] Ported a feature that allows adding comments to a query.
See
com.clickhouse.client.api.insert.InsertSettings#logComment
andcom.clickhouse.client.api.query.QuerySettings#logComment
for 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#register
method. (#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_AUTHENTICATION
for client v1 is added. For client v2 usecom.clickhouse.client.api.Client.Builder#useHTTPBasicAuth
method. (#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
Nested
type (#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
scale
from 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 OK
status. Happens whensend_progress_in_http_headers
is 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_token
throughInsertSettings
. (#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#useNewImplementation
tofalse
. (#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.allowBinaryReaderToReuseBuffers
for 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-client
andclickhouse-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#setClientNetworkBufferSize
introduced 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
NoHttpResponseException
when 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#retryOnFailures
andClient.Builder#setMaxRetries
were introduced to configure client behavior. (#1768)
- [client-v2] Correct timezone used when reading DateTime values. Affects how date/datetime values
are read when
session_timezone
is 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_timezone
is 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
FIFO
is selected then connections are reused in the order they were created. It results in even distribution of connections. IfLIFO
is selected then connections are reused as soon they are returned to the pool. Note: only forAPACHE_HTTP_CLIENT
connection 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-Agent
string is generated. NowClickHouse-JavaClient
portion is appended in all cases. It is still possible to set custom product name that will be the first part inUser-Agent
value. (#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
localhost
effective 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
Referer
HTTP 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
compression
andinfile
in insert statement.
- centralized configuration for JDBC driver using custom server setting
custom_jdbc_config
. - support
BEGIN TRANSACTION
,COMMIT
, andROLLBACK
in 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
JdbcTypeMapping
to 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-data
fromclickhouse-client
along 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
ClickHouseRequestManager
to support query/session ID customization. #1074 - added Apache HTTP Client 5 to support socket options. #1146
- enhanced
clickhouse-grpc-client
to 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
,ZSTD
Note: typo will be fixed in v0.4.1.
- enhanced
clickhouse-http-client
to 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
,ZSTD
Note: 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
ClickHouseRequest
by treating input stream andClickHouseWriter
equally. #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