Skip to content

Commit b097be5

Browse files
authored
Merge pull request #643 from zhicwu/prepare-release
Prepare release 0.3.1
2 parents b89e023 + aa2dfc3 commit b097be5

4 files changed

Lines changed: 37 additions & 31 deletions

File tree

CHANGELOG

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
0.3.1
2+
* BREAKING CHANGE - move query from url to request body
3+
* BREAKING CHANGE - always parse SQL(use extended API to skip that)
4+
* BREAKING CHANGE - remove keepAliveTimeout and useNewParser from ClickHouseProperties
5+
* BREAKING CHANGE - exclude RoaringBitmap from shaded jar
6+
* add new connection setting useSharedCookieStore for load balancing
7+
* add new query parameters: allow_experimental_bigint_types, allow_experimental_map_type, and join_algorithm
8+
* add new format: CustomSeparated and RowBinaryWithNamesAndTypes
9+
* fix 400 bad request error when dealing with large query
10+
* fix parser issue when DESC statement contains alias
11+
* support batch processing with arbitrary query - update and delete are not recommended so there'll be warnings
12+
* support multi-statement sql - session will be used automatically and only the last result will be returned
113
0.3.0
214
* BREAKING CHANGE - dropped JDK 7 support
315
* BREAKING CHANGE - removed Guava dependency(and so is UnsignedLong)

README.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,32 @@ URL syntax:
2020
JDBC Driver Class:
2121
`ru.yandex.clickhouse.ClickHouseDriver`
2222

23-
additionally, if you have a few instances, you can use `BalancedClickhouseDataSource`.
24-
25-
**Notice**
26-
27-
To use an up-to-date version of RoaringBitmap, please update your POM with below two changes:
28-
```xml
29-
<!-- 1. add repository -->
30-
<repositories>
31-
<repository>
32-
<id>jitpack.io</id>
33-
<url>https://jitpack.io</url>
34-
</repository>
35-
</repositories>
23+
For example:
24+
```java
25+
String url = "jdbc:clickhouse://localhost:8123/test";
26+
ClickHouseProperties properties = new ClickHouseProperties();
27+
// set connection options - see more defined in ClickHouseConnectionSettings
28+
properties.setClientName("Agent #1");
29+
...
30+
// set default request options - more in ClickHouseQueryParam
31+
properties.setSessionId("default-session-id");
32+
...
3633

37-
<!-- 2. add dependency(groupId is different from the one in maven central) -->
38-
<dependency>
39-
<groupId>com.github.RoaringBitmap</groupId>
40-
<artifactId>RoaringBitmap</artifactId>
41-
<version>0.9.10</version>
42-
</dependency>
34+
ClickHouseDataSource dataSource = new ClickHouseDataSource(url, properties)
35+
String sql = "select * from mytable";
36+
Map<ClickHouseQueryParam, String> additionalDBParams = new HashMap<>();
37+
// set request options, which will override the default ones in ClickHouseProperties
38+
additionalDBParams.put(ClickHouseQueryParam.SESSION_ID, "new-session-id");
39+
...
40+
try (ClickHouseConnection conn = dataSource.getConnection();
41+
ClickHouseStatement stmt = conn.createStatement();
42+
ResultSet rs = stmt.executeQuery(sql, additionalDBParams)) {
43+
...
44+
}
4345
```
4446

47+
Additionally, if you have a few instances, you can use `BalancedClickhouseDataSource`.
48+
4549
### Extended API
4650
In order to provide non-JDBC complaint data manipulation functionality, proprietary API exists.
4751
Entry point for API is `ClickHouseStatement#write()` method.

clickhouse-jdbc/src/main/java/ru/yandex/clickhouse/domain/ClickHouseFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @author Dmitry Andreev <a href="mailto:AndreevDm@yandex-team.ru"></a>
1414
*/
1515
public enum ClickHouseFormat {
16-
16+
CustomSeparated,
1717
TabSeparated,
1818
TabSeparatedRaw,
1919
TabSeparatedWithNames,

pom.xml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<lz4.version>1.7.1</lz4.version>
8686
<jackson-core.version>2.9.10</jackson-core.version>
8787
<jackson-databind.version>2.9.10.8</jackson-databind.version>
88-
<roaring-bitmap.version>0.9.3</roaring-bitmap.version>
88+
<roaring-bitmap.version>0.9.10</roaring-bitmap.version>
8989
<slf4j.version>1.7.30</slf4j.version>
9090
<mockito.version>1.10.19</mockito.version>
9191
<wiremock.version>2.27.2</wiremock.version>
@@ -432,14 +432,4 @@
432432
</build>
433433
</profile>
434434
</profiles>
435-
436-
<!--
437-
Add below to get latest RoaringBitmap lib
438-
<repositories>
439-
<repository>
440-
<id>jitpack.io</id>
441-
<url>https://jitpack.io</url>
442-
</repository>
443-
</repositories>
444-
-->
445435
</project>

0 commit comments

Comments
 (0)