Skip to content

Commit 99b7de5

Browse files
committed
removed some dependencies. added documentation about what is used
1 parent 0b32f08 commit 99b7de5

File tree

4 files changed

+39
-18
lines changed

4 files changed

+39
-18
lines changed

client-v2/docs/dependencies.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Module Dependencies
2+
3+
## Abstract
4+
This document describes module dependencies and a reason for their existence. Additionally
5+
the document keeps historical information about the dependencies.
6+
7+
## Dependencies
8+
9+
### 0.7.1-patch1
10+
11+
- `com.clickhouse:clickhouse-data:jar:0.7.1-patch1-SNAPSHOT:compile` - Required for reading custom data types. When client-v1 required classes should be moved to client-v2 module this dependency will be removed.
12+
- `com.clickhouse:clickhouse-client:jar:0.7.1-patch1-SNAPSHOT:compile` - Required because there is an option to use client-v1. Additionally, this dependency is required because a few core classes like `ClickHouseNode` are used in client-v2. When client-v1 is deprecated - all required classes should be moved to client-v2 module and this dependency will be removed.
13+
- `org.slf4j:slf4j-api:jar:2.0.7:compile` - Most commonly used logging frontend.
14+
- `org.apache.commons:commons-compress:jar:1.27.1:compile` - Required for compression.
15+
- `org.lz4:lz4-pure-java:jar:1.8.0:compile` - Required for compression.
16+
- `org.ow2.asm:asm:jar:9.7:compile` - Required for serialization/deserialization.
17+
- `org.apache.httpcomponents.client5:httpclient5:jar:5.3.1:compile` - only HTTP client that is currently supported. In the future it should be an optional dependency when support for different clients will be added. This client also implements async API that might be used in the future.
18+
- `com.fasterxml.jackson.core:jackson-core:jar:2.17.2:compile` - used to safely parse summary from ClickHouse.
19+
- `org.roaringbitmap:RoaringBitmap:jar:0.9.47:compile` - used for serialization/deserialization of aggregate functions. For some reason `clickhouse-data` modules has this dependency as `provided`.

client-v2/pom.xml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@
2121
</properties>
2222

2323
<dependencies>
24+
<dependency>
25+
<groupId>${project.parent.groupId}</groupId>
26+
<artifactId>clickhouse-data</artifactId>
27+
<version>${revision}</version>
28+
</dependency>
29+
30+
<dependency>
31+
<groupId>org.roaringbitmap</groupId>
32+
<artifactId>RoaringBitmap</artifactId>
33+
<version>${roaring-bitmap.version}</version>
34+
</dependency>
35+
2436
<dependency>
2537
<groupId>${project.parent.groupId}</groupId>
2638
<artifactId>clickhouse-client</artifactId>
@@ -37,26 +49,25 @@
3749
<artifactId>httpclient5</artifactId>
3850
<version>${apache.httpclient.version}</version>
3951
</dependency>
40-
<dependency>
41-
<groupId>com.github.luben</groupId>
42-
<artifactId>zstd-jni</artifactId>
43-
<optional>true</optional>
44-
</dependency>
52+
4553
<dependency>
4654
<groupId>org.lz4</groupId>
4755
<artifactId>lz4-pure-java</artifactId>
4856
<version>${lz4.version}</version>
4957
</dependency>
58+
5059
<dependency>
5160
<groupId>org.apache.commons</groupId>
5261
<artifactId>commons-compress</artifactId>
5362
<version>${compress.version}</version>
5463
</dependency>
64+
5565
<dependency>
5666
<groupId>org.ow2.asm</groupId>
5767
<artifactId>asm</artifactId>
5868
<version>9.7</version>
5969
</dependency>
70+
6071
<dependency>
6172
<groupId>com.fasterxml.jackson.core</groupId>
6273
<artifactId>jackson-core</artifactId>
@@ -83,12 +94,6 @@
8394
<scope>test</scope>
8495
<version>2.17.2</version>
8596
</dependency>
86-
<!-- necessary for Java 9+ -->
87-
<dependency>
88-
<groupId>org.apache.tomcat</groupId>
89-
<artifactId>annotations-api</artifactId>
90-
<scope>provided</scope>
91-
</dependency>
9297

9398
<!-- Test dependencies -->
9499
<dependency>
@@ -121,18 +126,14 @@
121126
<version>${testng.version}</version>
122127
<scope>test</scope>
123128
</dependency>
124-
<!-- Replace with newer version as soon java 11 is minimal version -->
129+
125130
<dependency>
126131
<groupId>com.github.tomakehurst</groupId>
127132
<artifactId>wiremock-jre8</artifactId>
128133
<version>2.35.2</version>
129134
<scope>test</scope>
130135
</dependency>
131-
<dependency>
132-
<groupId>org.roaringbitmap</groupId>
133-
<artifactId>RoaringBitmap</artifactId>
134-
<scope>test</scope>
135-
</dependency>
136+
136137
</dependencies>
137138

138139
<build>

client-v2/src/main/java/com/clickhouse/client/api/data_formats/internal/BinaryStreamReader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public <T> T readValue(ClickHouseColumn column) throws IOException {
8484
* @param <T> - target type of the value
8585
* @throws IOException when IO error occurs
8686
*/
87+
@SuppressWarnings("unchecked")
8788
public <T> T readValue(ClickHouseColumn column, Class<?> typeHint) throws IOException {
8889
if (column.isNullable()) {
8990
int isNull = readByteOrEOF(input);

client-v2/src/test/java/com/clickhouse/client/HttpTransportTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ public void testAdditionalHeaders() {
517517
.httpHeader("X-ClickHouse-Test", "test")
518518
.httpHeader("X-ClickHouse-Test-2", Arrays.asList("test1", "test2"));
519519

520-
try (QueryResponse response = client.query("SELECT 1", querySettings).get(1, TimeUnit.SECONDS)) {
520+
try (QueryResponse response = client.query("SELECT 1", querySettings).get(10, TimeUnit.SECONDS)) {
521521
Assert.assertEquals(response.getReadBytes(), 10);
522522
} catch (Exception e) {
523523
e.printStackTrace();

0 commit comments

Comments
 (0)