From 447f0a5669082abe91020d147ff41f0063287177 Mon Sep 17 00:00:00 2001 From: Sergey Chernov Date: Fri, 20 Dec 2024 14:10:18 -0800 Subject: [PATCH 1/4] Updated change log. Updated versions --- .github/workflows/nightly.yml | 2 +- .github/workflows/release.yml | 2 +- CHANGELOG.md | 25 ++++++++++++++-- README.md | 6 ++-- examples/client-v2/pom.xml | 13 +------- examples/client/pom.xml | 30 ++----------------- examples/demo-kotlin-service/build.gradle.kts | 4 +-- .../demo-kotlin-service/gradle.properties | 2 ++ examples/demo-service/build.gradle.kts | 7 ++--- examples/demo-service/gradle.properties | 2 ++ examples/jdbc/pom.xml | 12 +------- pom.xml | 16 +++++----- 12 files changed, 47 insertions(+), 74 deletions(-) create mode 100644 examples/demo-service/gradle.properties diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a4023c3d4..aa3b3498d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -12,7 +12,7 @@ on: env: CHC_BRANCH: "main" - CHC_VERSION: "0.7.1" + CHC_VERSION: "0.7.2" CH_VERSION: "24.8" jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 887367ac3..40c73b44b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: version: description: "Release version" required: true - default: "0.7.1-SNAPSHOT" + default: "0.7.2-SNAPSHOT" env: CH_VERSION: "24.8" diff --git a/CHANGELOG.md b/CHANGELOG.md index 070950dba..06280c74f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,31 @@ ## Latest +## 0.7.2 + +### New Components +- `jdbc-v2` - pre-release version of upcoming `clickhouse-jdbc` replacement. Supports basic functionality, works only with `client-v2`. +More information will be available after its release + +### Highlights +- [repo] Added shaded packages with requires set of dependencies. Use `all` classified for `client-v2` full package. +Use `shaded-all` for old jdbc driver. + + ### New Features -- 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] Added ability to specify client name. It means `User-Agent` will be filled with proper information (https://github.com/ClickHouse/clickhouse-java/pull/1948) +- [client-v2] Implemented statement parameters for `queryAll` and `queryRecords` API methods. (https://github.com/ClickHouse/clickhouse-java/pull/1979) +- [client-v2] Implemented string to number conversion. (https://github.com/ClickHouse/clickhouse-java/pull/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. (https://github.com/ClickHouse/clickhouse-java/pull/2028) +- [client-v2] Client will load some server context (timezone, user) right after build. (https://github.com/ClickHouse/clickhouse-java/pull/2029) ### Bug Fixes -- Fix for retrying on `ConnectTimeoutException` +- [jdbc] Fixed default value for `result_overflow_mode` setting. (https://github.com/ClickHouse/clickhouse-java/issues/1932) +- [client-v2] Fixed reading float/double values. Previously was prevented by incorrect overflow check. (https://github.com/ClickHouse/clickhouse-java/issues/1954) +- [client-v2] Fixed issue with enabling client compression. Previously flag was ignore in some cases. (https://github.com/ClickHouse/clickhouse-java/issues/1958) +- [client-v2] Fixed issue with reading `Array(UInt64)` because of incorrect class used to create internal array. (https://github.com/ClickHouse/clickhouse-java/issues/1990) +- [client-v2] Fixed ClickHouseLZ4OutputStream issue of sending empty frame when no data left in uncompressed buffer. (https://github.com/ClickHouse/clickhouse-java/issues/1993) +- [client-v2] Fix handling `ConnectTimeoutException` in retry and wrapping logic. (https://github.com/ClickHouse/clickhouse-java/pull/2015) ## 0.7.1-patch1 diff --git a/README.md b/README.md index 33a78e523..0dedc61ac 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,10 @@ Old client still be used when: ## Important -### Upcomming deprecations: +### Upcoming deprecations: | Component | Version | Comment | |--------------------------------|---------|--------------------------------------------------| | ClickHouse Java v1 | TBC | We'll be deprecating Java v1 in 2025 | -| ClickHouse CLI Client (Java) | 0.7.0 | Please use `clickhouse-client` (see https://clickhouse.com/docs/en/interfaces/cli#clickhouse-client) | -| ClickHouse GRPC Client | 0.7.0 | Please use the ClickHouse http client instead. GRPC protos still available https://github.com/ClickHouse/ClickHouse/tree/master/src/Server/grpc_protos | ## Installation @@ -77,7 +75,7 @@ Nightly Builds: https://s01.oss.sonatype.org/content/repositories/snapshots/com/ | ClickHouse Version | Client Version | Comment | |--------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------| -| Server >= 23.0 | 0.6.2 | | +| Server >= 23.0 | 0.6.2+ | | ### Features diff --git a/examples/client-v2/pom.xml b/examples/client-v2/pom.xml index 7a4b33538..c0860e806 100644 --- a/examples/client-v2/pom.xml +++ b/examples/client-v2/pom.xml @@ -34,16 +34,6 @@ HEAD - - Github - https://github.com/ClickHouse/clickhouse-java/issues - - - - Github - https://github.com/ClickHouse/clickhouse-java/actions - - central @@ -64,8 +54,7 @@ UTF-8 UTF-8 - 0.7.1-patch1-SNAPSHOT - 5.3.1 + 0.7.2-SNAPSHOT 3.8.1 diff --git a/examples/client/pom.xml b/examples/client/pom.xml index eac50ec9b..8c72faf66 100644 --- a/examples/client/pom.xml +++ b/examples/client/pom.xml @@ -27,32 +27,6 @@ - - - zhicwu - Zhichun Wu - zhicwu@gmail.com - +8 - - - - - https://github.com/ClickHouse/clickhouse-java - scm:git@github.com:ClickHouse/clickhouse-java.git - scm:git@github.com:ClickHouse/clickhouse-java.git - HEAD - - - - Github - https://github.com/ClickHouse/clickhouse-java/issues - - - - Github - https://github.com/ClickHouse/clickhouse-java/actions - - ossrh @@ -66,9 +40,9 @@ UTF-8 UTF-8 - 0.7.1-patch1-SNAPSHOT + 0.7.2-SNAPSHOT - + 5.2.1 diff --git a/examples/demo-kotlin-service/build.gradle.kts b/examples/demo-kotlin-service/build.gradle.kts index 191e849b5..ee9570807 100644 --- a/examples/demo-kotlin-service/build.gradle.kts +++ b/examples/demo-kotlin-service/build.gradle.kts @@ -33,8 +33,8 @@ dependencies { implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") // https://mvnrepository.com/artifact/com.clickhouse/client-v2 - implementation("com.clickhouse:client-v2:0.7.1-patch1-SNAPSHOT:all") -// implementation("com.clickhouse:client-v2:0.7.1-patch1:all") // release version + implementation("com.clickhouse:client-v2:$ch_java_client_version-SNAPSHOT:all") +// implementation("com.clickhouse:client-v2:$ch_java_client_version:all") // release version testImplementation("io.ktor:ktor-server-test-host-jvm") testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version") diff --git a/examples/demo-kotlin-service/gradle.properties b/examples/demo-kotlin-service/gradle.properties index eb56c3c25..844426005 100644 --- a/examples/demo-kotlin-service/gradle.properties +++ b/examples/demo-kotlin-service/gradle.properties @@ -2,3 +2,5 @@ kotlin.code.style=official ktor_version=2.3.12 kotlin_version=2.0.20 logback_version=1.4.14 + +ch_java_client_version=0.7.2 \ No newline at end of file diff --git a/examples/demo-service/build.gradle.kts b/examples/demo-service/build.gradle.kts index 9583e8351..ad66266f1 100644 --- a/examples/demo-service/build.gradle.kts +++ b/examples/demo-service/build.gradle.kts @@ -29,11 +29,8 @@ dependencies { // -- clickhouse dependencies // Main dependency - implementation("com.clickhouse:client-v2:0.7.1-patch1-SNAPSHOT:all") // local or nightly build -// implementation("com.clickhouse:client-v2:0.7.1-patch1:all") // release version - - // -- clickhouse-http-client dependencies if old implementation is needed -// implementation("com.clickhouse:clickhouse-http-client:0.7.1-SNAPSHOT") + implementation("com.clickhouse:client-v2:$ch_java_client_version-SNAPSHOT:all") // local or nightly build +// implementation("com.clickhouse:client-v2:$ch_java_client_version:all") // release version // -- application dependencies implementation("org.springframework.boot:spring-boot-starter-actuator") diff --git a/examples/demo-service/gradle.properties b/examples/demo-service/gradle.properties new file mode 100644 index 000000000..6ff1254cf --- /dev/null +++ b/examples/demo-service/gradle.properties @@ -0,0 +1,2 @@ + +ch_java_client_version=0.7.2 \ No newline at end of file diff --git a/examples/jdbc/pom.xml b/examples/jdbc/pom.xml index a7e9a43d7..219ca3b24 100644 --- a/examples/jdbc/pom.xml +++ b/examples/jdbc/pom.xml @@ -34,16 +34,6 @@ HEAD - - Github - https://github.com/ClickHouse/clickhouse-java/issues - - - - Github - https://github.com/ClickHouse/clickhouse-java/actions - - ossrh @@ -57,7 +47,7 @@ UTF-8 UTF-8 - 0.7.1-patch1-SNAPSHOT + 0.7.2-SNAPSHOT 4.0.3 5.2.1 diff --git a/pom.xml b/pom.xml index dedc39527..e478f4164 100644 --- a/pom.xml +++ b/pom.xml @@ -27,14 +27,14 @@ - - - zhicwu - Zhichun Wu - zhicwu@gmail.com - +8 - - + + + + + + + + From 82adbaf4bb9c2290825cb330cad7908102ed9b4d Mon Sep 17 00:00:00 2001 From: Sergey Chernov Date: Fri, 20 Dec 2024 17:54:05 -0800 Subject: [PATCH 2/4] fix examples build --- examples/demo-kotlin-service/build.gradle.kts | 6 ++++-- examples/demo-service/build.gradle.kts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/demo-kotlin-service/build.gradle.kts b/examples/demo-kotlin-service/build.gradle.kts index ee9570807..88fbf7ee1 100644 --- a/examples/demo-kotlin-service/build.gradle.kts +++ b/examples/demo-kotlin-service/build.gradle.kts @@ -23,6 +23,8 @@ repositories { mavenCentral() } +val ch_java_client_version: String by extra + dependencies { // application dependencies implementation("io.ktor:ktor-server-core-jvm") @@ -33,8 +35,8 @@ dependencies { implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") // https://mvnrepository.com/artifact/com.clickhouse/client-v2 - implementation("com.clickhouse:client-v2:$ch_java_client_version-SNAPSHOT:all") -// implementation("com.clickhouse:client-v2:$ch_java_client_version:all") // release version + implementation("com.clickhouse:client-v2:${ch_java_client_version}-SNAPSHOT:all") +// implementation("com.clickhouse:client-v2:${ch_java_client_version}:all") // release version testImplementation("io.ktor:ktor-server-test-host-jvm") testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version") diff --git a/examples/demo-service/build.gradle.kts b/examples/demo-service/build.gradle.kts index ad66266f1..2d72ffd1a 100644 --- a/examples/demo-service/build.gradle.kts +++ b/examples/demo-service/build.gradle.kts @@ -25,12 +25,14 @@ repositories { maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") // for nightly builds } +val ch_java_client_version: String by extra + dependencies { // -- clickhouse dependencies // Main dependency - implementation("com.clickhouse:client-v2:$ch_java_client_version-SNAPSHOT:all") // local or nightly build -// implementation("com.clickhouse:client-v2:$ch_java_client_version:all") // release version + implementation("com.clickhouse:client-v2:${ch_java_client_version}-SNAPSHOT:all") // local or nightly build +// implementation("com.clickhouse:client-v2:${ch_java_client_version}:all") // release version // -- application dependencies implementation("org.springframework.boot:spring-boot-starter-actuator") From b3c68b008454bb3eadf1c781219b488508987019 Mon Sep 17 00:00:00 2001 From: Sergey Chernov Date: Fri, 20 Dec 2024 18:19:14 -0800 Subject: [PATCH 3/4] fix examples build --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e478f4164..c1f9637d2 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ - 0.7.1-patch1-SNAPSHOT + 0.7.2-SNAPSHOT 2024 UTF-8 UTF-8 From 8e2cfb7cb529c46fa4b38ce5293c1d8b3552faea Mon Sep 17 00:00:00 2001 From: Sergey Chernov Date: Sun, 29 Dec 2024 13:28:15 -0800 Subject: [PATCH 4/4] added line about writer API --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06280c74f..8bab20beb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,11 @@ More information will be available after its release ### Highlights -- [repo] Added shaded packages with requires set of dependencies. Use `all` classified for `client-v2` full package. +- [repo] Added shaded packages with requires a set of dependencies. Use `all` classified for `client-v2` full package. Use `shaded-all` for 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)` +(https://github.com/ClickHouse/clickhouse-java/pull/2034) ### New Features