Skip to content

Commit db5a41d

Browse files
authored
Merge pull request #2632 from ClickHouse/pre_0.9.3
Pre 0.9.3
2 parents b4b8211 + b0b75f0 commit db5a41d

File tree

11 files changed

+66
-9
lines changed

11 files changed

+66
-9
lines changed

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
## 0.9.3
2+
3+
### Important Changes
4+
- [jdbc-v2] SQL parser from v1 is ported to v2 to address multiple issues with SQL parsing. The ANTLR4-based parser is
5+
still an option and will be developed further. The main difference between parses is completeness of their grammar:
6+
JavaCC grabs only needed information and skips parsing of the rest (what makes it work for most cases) while ANTLR4
7+
has more complete grammar and can detect type of some complex statements more accurate than JavaCC.
8+
To use it set `com.clickhouse.jdbc.DriverProperties#SQL_PARSER` to `ANTLR4`.
9+
(https://github.com/ClickHouse/clickhouse-java/pull/2579). This fixes issue:
10+
- https://github.com/ClickHouse/clickhouse-java/issues/2574
11+
- https://github.com/ClickHouse/clickhouse-java/issues/2568
12+
- https://github.com/ClickHouse/clickhouse-java/issues/2537
13+
- https://github.com/ClickHouse/clickhouse-java/issues/2595
14+
- https://github.com/ClickHouse/clickhouse-java/issues/2617
15+
- https://github.com/ClickHouse/clickhouse-java/issues/2569
16+
- https://github.com/ClickHouse/clickhouse-java/issues/2570
17+
- https://github.com/ClickHouse/clickhouse-java/issues/2571
18+
- https://github.com/ClickHouse/clickhouse-java/issues/2572
19+
- https://github.com/ClickHouse/clickhouse-java/issues/2573
20+
- https://github.com/ClickHouse/clickhouse-java/issues/2609
21+
- https://github.com/ClickHouse/clickhouse-java/issues/2527
22+
23+
- [repo] New artifact `clickhouse-jdbc-all` added to address issue when maven package qualifiers may not be used.
24+
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)
25+
26+
### Improvements
27+
- [client-v2] Added `getShortArray()` and `getStringArray()` to `ClickHouseBinaryFormatReader`. (https://github.com/ClickHouse/clickhouse-java/pull/2604)
28+
- [client-v2] Added `result_rows` and `elapsed_time` to summary object. (https://github.com/ClickHouse/clickhouse-java/pull/1633/files)
29+
30+
### Bug Fixes
31+
- [jdbc-v2] Fixed issue with `maxRows` in `Statement` when additional settings were used to limit result set size.
32+
It caused problems with read-only users because such users may not change settings in most cases. Now when `maxRows` is
33+
set then `ResultSet` will skip extra rows. (https://github.com/ClickHouse/clickhouse-java/issues/2582)
34+
- [jdbc-v2] Fixed issue with driver version. Previously version of a library was converted to minor and major version.
35+
But this approach doesn't work well with `0.9.x` versions. Now major and minor versions are combined by shifting major.
36+
Patch version becomes a minor version. (https://github.com/ClickHouse/clickhouse-java/issues/2410)
37+
- [jdbc-v2, client-v2] Fixed converting different data types to a string. For example, there was an issue with IP
38+
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)
39+
- [jdbc-v2] Fixed issues around spatial data (GEO types). (https://github.com/ClickHouse/clickhouse-java/issues/2577)
40+
- [client-v2] Fixed issue with current user name. If user name is set then it will be used event after reading
41+
server context. (https://github.com/ClickHouse/clickhouse-java/issues/2247)
42+
- [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)
43+
- [jdbc-v2] Fixed getting metadata for nullable columns. (https://github.com/ClickHouse/clickhouse-java/issues/2586)
44+
- [jdbc-v2, client-v2] Fixed issues related to reading JSON data type. Fixed reading JSON columns with arrays. Previously was causing exceptions like
45+
`com.clickhouse.client.api.ClientException: Unsupported data type with tag 101 at ...`
46+
(https://github.com/ClickHouse/clickhouse-java/issues/2598, https://github.com/ClickHouse/clickhouse-java/issues/2593,
47+
https://github.com/ClickHouse/clickhouse-java/issues/2613, https://github.com/ClickHouse/clickhouse-java/issues/2102)
48+
- [client-v2] Fixed configuration parameter type for `socket_linger` to match documentation. (https://github.com/ClickHouse/clickhouse-java/issues/2524)
49+
- [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)
50+
- [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)
51+
- [jdbc-v2] Fixed ANTLR4 parse issue with `filter` clause along with aggregate function. (https://github.com/ClickHouse/clickhouse-java/pull/2631)
52+
153
## 0.9.2
254

355
### Improvements

examples/client-v2/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5555
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5656

57-
<clickhouse-java.version>0.9.2-SNAPSHOT</clickhouse-java.version>
57+
<clickhouse-java.version>0.9.3-SNAPSHOT</clickhouse-java.version>
5858

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

examples/client/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4141
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
4242

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

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

examples/demo-kotlin-service/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ ktor_version=2.3.12
33
kotlin_version=2.0.20
44
logback_version=1.4.14
55

6-
ch_java_client_version=0.9.2
6+
ch_java_client_version=0.9.3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
ch_java_client_version=0.9.2
2+
ch_java_client_version=0.9.3

examples/jdbc/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5555
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5656

57-
<clickhouse-java.version>0.9.2-SNAPSHOT</clickhouse-java.version>
57+
<clickhouse-java.version>0.9.3-SNAPSHOT</clickhouse-java.version>
5858
<hikaricp.version>4.0.3</hikaricp.version>
5959
<apache-httpclient.version>5.2.1</apache-httpclient.version>
6060

examples/r2dbc/clickhouse-r2dbc-spring-webflux-sample/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<properties>
1515
<maven.compiler.source>1.8</maven.compiler.source>
1616
<maven.compiler.target>1.8</maven.compiler.target>
17-
<clickhouse-java.version>0.9.2-SNAPSHOT</clickhouse-java.version>
17+
<clickhouse-java.version>0.9.3-SNAPSHOT</clickhouse-java.version>
1818
<spring-boot-starter.version>2.7.18</spring-boot-starter.version>
1919
</properties>
2020

jdbc-v2/src/main/antlr4/com/clickhouse/jdbc/internal/parser/antlr4/ClickHouseParser.g4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,7 @@ keyword
13691369
| SHOW
13701370
| SOURCE
13711371
| START
1372+
| STATISTICS
13721373
| STOP
13731374
| SUBSTRING
13741375
| SYNC
@@ -1439,6 +1440,8 @@ keywordForAlias
14391440
| MINUTE
14401441
| SECOND
14411442
| REVOKE
1443+
| URL
1444+
| STATISTICS
14421445
;
14431446

14441447
alias

jdbc-v2/src/test/java/com/clickhouse/jdbc/internal/BaseSqlParserFacadeTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ public static Object[][] testStatementWithoutResultSetDP() {
581581
{"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},
582582
{"CREATE SETTINGS PROFILE max_memory_usage_profile SETTINGS max_memory_usage = 100000001 MIN 90000000 MAX 110000000 TO robin", 0, false},
583583
{"CREATE NAMED COLLECTION foobar AS a = '1', b = '2' OVERRIDABLE", 0, false},
584+
{"CREATE TABLE IF NOT EXISTS statistics.vast_event_v2 (ip UInt32, url String) ENGINE = ReplacingMergeTree()", 0, false},
585+
{"CREATE TABLE IF NOT EXISTS `statistics`.vast_event_v2 (ip UInt32, url String) ENGINE = ReplacingMergeTree()", 0, false},
584586
{"alter table t2 alter column v type Int32", 0, false},
585587
{"alter table t alter column j default 1", 0, false},
586588
{"ALTER TABLE t MODIFY COLUMN j default 1", 0, false},

performance/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<properties>
1616
<apache.httpclient.version>5.3.1</apache.httpclient.version>
1717
<slf4j.version>2.0.17</slf4j.version>
18-
<ch.jdbc.revision>0.9.2-SNAPSHOT</ch.jdbc.revision>
18+
<ch.jdbc.revision>0.9.3-SNAPSHOT</ch.jdbc.revision>
1919
<jmh.version>1.37</jmh.version>
2020
<testcontainers.version>1.20.6</testcontainers.version>
2121

0 commit comments

Comments
 (0)