diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a2eb777c0..2c047b50e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -12,7 +12,7 @@ on: env: CHC_BRANCH: "main" - CHC_VERSION: "0.6.5" + CHC_VERSION: "0.7.0" jobs: nightly: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2949ebfd..dcf1f632c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: version: description: "Release version" required: true - default: "0.6.5-SNAPSHOT" + default: "0.7.0-SNAPSHOT" jobs: release: diff --git a/CHANGELOG.md b/CHANGELOG.md index 90bb7612a..5d84bb5f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,52 @@ ## Latest +## 0.7.0 + +### Deprecations +- Following deprecated components are removed: + - clickhouse-cli-client + - clickhouse-grpc-client + +### Important Changes +- [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` to `false`. (https://github.com/ClickHouse/clickhouse-java/pull/1847) + +### New Features +- [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. (https://github.com/ClickHouse/clickhouse-java/issues/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. (https://github.com/ClickHouse/clickhouse-java/issues/1782) +- [client-v2] Added support for writing AggregateFunction values (bitmap serialization). !! Reading is not +supported but will be added in the next release. (https://github.com/ClickHouse/clickhouse-java/pull/1814) +- [r2dbc] Defer connection creation. This allows pool to create a new instance on every subscription, +instead of always returning the same one. (https://github.com/ClickHouse/clickhouse-java/pull/1810) + +### Performance Improvements +- [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. (https://github.com/ClickHouse/clickhouse-java/pull/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. (https://github.com/ClickHouse/clickhouse-java/pull/1794, +https://github.com/ClickHouse/clickhouse-java/pull/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. (https://github.com/ClickHouse/clickhouse-java/pull/1795) + +### Documentation +- [client-v2] Added example for Kotlin (https://github.com/ClickHouse/clickhouse-java/pull/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. + +### Bug Fixes +- [client-v2] Fix for cases when missing operation metrics were causing NPE. (https://github.com/ClickHouse/clickhouse-java/pull/1846) +- [client-v2] Fix for handling empty result by BinaryFormat readers. (https://github.com/ClickHouse/clickhouse-java/pull/1845) +- [jdbc] Content of an artifact 'clickhouse-jdbc-{version}-all.jar' is fixed and contains all required classes from `clickhouse-client` +and `clickhouse-data`. (https://github.com/ClickHouse/clickhouse-java/pull/1842) +- [client-v1, jdbc] Endpoints definition parsing fixed to grub properties correctly. Now even properties with key-value +pairs are supported. (https://github.com/ClickHouse/clickhouse-java/pull/1841, https://github.com/ClickHouse/clickhouse-java/issues/1665) + ## 0.6.5 ### Deprecations diff --git a/examples/client-v2/pom.xml b/examples/client-v2/pom.xml index 117f52e7d..0c025c950 100644 --- a/examples/client-v2/pom.xml +++ b/examples/client-v2/pom.xml @@ -64,7 +64,7 @@ UTF-8 UTF-8 - 0.6.5-SNAPSHOT + 0.7.0-SNAPSHOT 5.2.1 3.8.1 diff --git a/examples/client/pom.xml b/examples/client/pom.xml index 4f693ec1e..a91b9aea0 100644 --- a/examples/client/pom.xml +++ b/examples/client/pom.xml @@ -66,9 +66,9 @@ UTF-8 UTF-8 - 0.6.5-SNAPSHOT + 0.7.0-SNAPSHOT - + 5.2.1 diff --git a/examples/demo-kotlin-service/build.gradle.kts b/examples/demo-kotlin-service/build.gradle.kts index 9d341a00e..da307f7a2 100644 --- a/examples/demo-kotlin-service/build.gradle.kts +++ b/examples/demo-kotlin-service/build.gradle.kts @@ -33,7 +33,7 @@ dependencies { implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") // https://mvnrepository.com/artifact/com.clickhouse/client-v2 - implementation("com.clickhouse:client-v2:0.6.5-SNAPSHOT") + implementation("com.clickhouse:client-v2:0.7.0-SNAPSHOT") // http client used by clickhouse client implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1") diff --git a/examples/demo-service/build.gradle.kts b/examples/demo-service/build.gradle.kts index 085b24061..b3ea04944 100644 --- a/examples/demo-service/build.gradle.kts +++ b/examples/demo-service/build.gradle.kts @@ -29,7 +29,7 @@ dependencies { // -- clickhouse dependencies // Main dependency - implementation("com.clickhouse:client-v2:0.6.5-SNAPSHOT") // nightly build + implementation("com.clickhouse:client-v2:0.7.0-SNAPSHOT") // nightly build // implementation("com.clickhouse:client-v2:0.6.5") // stable version // http client used by clickhouse client implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1") diff --git a/examples/jdbc/pom.xml b/examples/jdbc/pom.xml index b0d600fc0..a8fbcd19e 100644 --- a/examples/jdbc/pom.xml +++ b/examples/jdbc/pom.xml @@ -66,7 +66,7 @@ UTF-8 UTF-8 - 0.6.5-SNAPSHOT + 0.7.0-SNAPSHOT 4.0.3 5.2.1 diff --git a/examples/r2dbc/clickhouse-r2dbc-spring-webflux-sample/pom.xml b/examples/r2dbc/clickhouse-r2dbc-spring-webflux-sample/pom.xml index de0cbe1ad..461908081 100644 --- a/examples/r2dbc/clickhouse-r2dbc-spring-webflux-sample/pom.xml +++ b/examples/r2dbc/clickhouse-r2dbc-spring-webflux-sample/pom.xml @@ -14,7 +14,7 @@ 1.8 1.8 - 0.6.0 + 0.7.0-SNAPSHOT 2.7.18 diff --git a/pom.xml b/pom.xml index 48b6009c5..f6b2ccc81 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,7 @@ - 0.6.5-SNAPSHOT + 0.7.0-SNAPSHOT 2024 UTF-8 UTF-8