Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
## 0.9.3

### Important Changes
- [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_PARSER` to `ANTLR4`.
(https://github.com/ClickHouse/clickhouse-java/pull/2579). This fixes issue:
- https://github.com/ClickHouse/clickhouse-java/issues/2574
- https://github.com/ClickHouse/clickhouse-java/issues/2568
- https://github.com/ClickHouse/clickhouse-java/issues/2537
- https://github.com/ClickHouse/clickhouse-java/issues/2595
- https://github.com/ClickHouse/clickhouse-java/issues/2617
- https://github.com/ClickHouse/clickhouse-java/issues/2569
- https://github.com/ClickHouse/clickhouse-java/issues/2570
- https://github.com/ClickHouse/clickhouse-java/issues/2571
- https://github.com/ClickHouse/clickhouse-java/issues/2572
- https://github.com/ClickHouse/clickhouse-java/issues/2573
- https://github.com/ClickHouse/clickhouse-java/issues/2609
- https://github.com/ClickHouse/clickhouse-java/issues/2527

- [repo] New artifact `clickhouse-jdbc-all` added to address issue when maven package qualifiers may not be used.
This artifact should is a copy of `clickhouse-jdbc:all` but should be used only when required. (https://github.com/ClickHouse/clickhouse-java/issues/2625)

### Improvements
- [client-v2] Added `getShortArray()` and `getStringArray()` to `ClickHouseBinaryFormatReader`. (https://github.com/ClickHouse/clickhouse-java/pull/2604)
- [client-v2] Added `result_rows` and `elapsed_time` to summary object. (https://github.com/ClickHouse/clickhouse-java/pull/1633/files)

### Bug Fixes
- [jdbc-v2] Fixed issue with `maxRows` in `Statement` when 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 when `maxRows` is
set then `ResultSet` will skip extra rows. (https://github.com/ClickHouse/clickhouse-java/issues/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.x` versions. Now major and minor versions are combined by shifting major.
Patch version becomes a minor version. (https://github.com/ClickHouse/clickhouse-java/issues/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.0` instead of `0.0.0.0`. (https://github.com/ClickHouse/clickhouse-java/issues/2575)
- [jdbc-v2] Fixed issues around spatial data (GEO types). (https://github.com/ClickHouse/clickhouse-java/issues/2577)
- [client-v2] Fixed issue with current user name. If user name is set then it will be used event after reading
server context. (https://github.com/ClickHouse/clickhouse-java/issues/2247)
- [client-v2] Fixed issue with network timeout settings when default value failed to be cast to Long. (https://github.com/ClickHouse/clickhouse-java/issues/2597)
- [jdbc-v2] Fixed getting metadata for nullable columns. (https://github.com/ClickHouse/clickhouse-java/issues/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 ...`
(https://github.com/ClickHouse/clickhouse-java/issues/2598, https://github.com/ClickHouse/clickhouse-java/issues/2593,
https://github.com/ClickHouse/clickhouse-java/issues/2613, https://github.com/ClickHouse/clickhouse-java/issues/2102)
- [client-v2] Fixed configuration parameter type for `socket_linger` to match documentation. (https://github.com/ClickHouse/clickhouse-java/issues/2524)
- [client-v2] Fixed handling exceptions in http client code. Now response object is always closed to prevent connection leaking. (https://github.com/ClickHouse/clickhouse-java/pull/2615)
- [jdbc-v2, client-v2] Fixed issue with duplicate column names in a result set. (https://github.com/ClickHouse/clickhouse-java/issues/2459, https://github.com/ClickHouse/clickhouse-java/issues/2336)
- [jdbc-v2] Fixed ANTLR4 parse issue with `filter` clause along with aggregate function. (https://github.com/ClickHouse/clickhouse-java/pull/2631)

## 0.9.2

### Improvements
Expand Down
2 changes: 1 addition & 1 deletion examples/client-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<clickhouse-java.version>0.9.2-SNAPSHOT</clickhouse-java.version>
<clickhouse-java.version>0.9.3-SNAPSHOT</clickhouse-java.version>

<compiler-plugin.version>3.8.1</compiler-plugin.version>

Expand Down
4 changes: 2 additions & 2 deletions examples/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<clickhouse-java.version>0.9.2-SNAPSHOT</clickhouse-java.version>
<clickhouse-java.version>0.9.3-SNAPSHOT</clickhouse-java.version>
<!-- Nightly snapshot version from https://central.sonatype.com/repository/maven-snapshots/or latest from local -->
<!-- <clickhouse-java.version>0.9.2-SNAPSHOT</clickhouse-java.version>-->
<!-- <clickhouse-java.version>0.9.3-SNAPSHOT</clickhouse-java.version>-->

<apache-httpclient.version>5.2.1</apache-httpclient.version>

Expand Down
2 changes: 1 addition & 1 deletion examples/demo-kotlin-service/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ ktor_version=2.3.12
kotlin_version=2.0.20
logback_version=1.4.14

ch_java_client_version=0.9.2
ch_java_client_version=0.9.3
2 changes: 1 addition & 1 deletion examples/demo-service/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

ch_java_client_version=0.9.2
ch_java_client_version=0.9.3
2 changes: 1 addition & 1 deletion examples/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<clickhouse-java.version>0.9.2-SNAPSHOT</clickhouse-java.version>
<clickhouse-java.version>0.9.3-SNAPSHOT</clickhouse-java.version>
<hikaricp.version>4.0.3</hikaricp.version>
<apache-httpclient.version>5.2.1</apache-httpclient.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<clickhouse-java.version>0.9.2-SNAPSHOT</clickhouse-java.version>
<clickhouse-java.version>0.9.3-SNAPSHOT</clickhouse-java.version>
<spring-boot-starter.version>2.7.18</spring-boot-starter.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,7 @@ keyword
| SHOW
| SOURCE
| START
| STATISTICS
| STOP
| SUBSTRING
| SYNC
Expand Down Expand Up @@ -1439,6 +1440,8 @@ keywordForAlias
| MINUTE
| SECOND
| REVOKE
| URL
| STATISTICS
;

alias
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,8 @@ public static Object[][] testStatementWithoutResultSetDP() {
{"CREATE QUOTA qB FOR INTERVAL 30 minute MAX execution_time = 0.5, FOR INTERVAL 5 quarter MAX queries = 321, errors = 10 TO default", 0, false},
{"CREATE SETTINGS PROFILE max_memory_usage_profile SETTINGS max_memory_usage = 100000001 MIN 90000000 MAX 110000000 TO robin", 0, false},
{"CREATE NAMED COLLECTION foobar AS a = '1', b = '2' OVERRIDABLE", 0, false},
{"CREATE TABLE IF NOT EXISTS statistics.vast_event_v2 (ip UInt32, url String) ENGINE = ReplacingMergeTree()", 0, false},
{"CREATE TABLE IF NOT EXISTS `statistics`.vast_event_v2 (ip UInt32, url String) ENGINE = ReplacingMergeTree()", 0, false},
{"alter table t2 alter column v type Int32", 0, false},
{"alter table t alter column j default 1", 0, false},
{"ALTER TABLE t MODIFY COLUMN j default 1", 0, false},
Expand Down
2 changes: 1 addition & 1 deletion performance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<properties>
<apache.httpclient.version>5.3.1</apache.httpclient.version>
<slf4j.version>2.0.17</slf4j.version>
<ch.jdbc.revision>0.9.2-SNAPSHOT</ch.jdbc.revision>
<ch.jdbc.revision>0.9.3-SNAPSHOT</ch.jdbc.revision>
<jmh.version>1.37</jmh.version>
<testcontainers.version>1.20.6</testcontainers.version>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</ciManagement>

<properties>
<revision>0.9.2-SNAPSHOT</revision>
<revision>0.9.3-SNAPSHOT</revision>
<project.current.year>2025</project.current.year>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand Down
Loading