Skip to content

Commit c0c7938

Browse files
authored
Merge pull request #2554 from ClickHouse/shade_antlr
[repo] Shade Antlr Runtime Library
2 parents d27ac08 + 0a04501 commit c0c7938

File tree

8 files changed

+14
-16
lines changed

8 files changed

+14
-16
lines changed

clickhouse-jdbc/pom.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@
419419
<relocation>
420420
<!-- lz4 compression -->
421421
<pattern>net.jpountz</pattern>
422-
<shadedPattern>${shade.base}.jpountz</shadedPattern>
422+
<shadedPattern>${shade.base}.net.jpountz</shadedPattern>
423423
</relocation>
424424
<relocation>
425425
<pattern>org.roaringbitmap</pattern>
@@ -435,12 +435,17 @@
435435

436436
<relocation>
437437
<pattern>com.google</pattern>
438-
<shadedPattern>${shade.base}.google</shadedPattern>
438+
<shadedPattern>${shade.base}.com.google</shadedPattern>
439439
</relocation>
440440

441441
<relocation>
442442
<pattern>org.apache</pattern>
443-
<shadedPattern>${shade.base}.apache</shadedPattern>
443+
<shadedPattern>${shade.base}.org.apache</shadedPattern>
444+
</relocation>
445+
446+
<relocation>
447+
<pattern>org.antlr</pattern>
448+
<shadedPattern>${shade.base}.org.antlr</shadedPattern>
444449
</relocation>
445450
</relocations>
446451
<transformers>

client-v2/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
<url>https://github.com/ClickHouse/clickhouse-java/tree/main/client-v2</url>
1818

1919
<properties>
20-
<apache.httpclient.version>5.3.1</apache.httpclient.version>
2120
<shade.base>${project.groupId}.shaded</shade.base>
2221
</properties>
2322

client-v2/src/test/java/com/clickhouse/client/query/QueryTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,14 +1947,14 @@ public void testReadingJSONValues() throws Exception {
19471947
client.execute("INSERT INTO test_json_values VALUES ('{\"a\" : {\"b\" : 42}, \"c\" : [1, 2, 3]}')", commandSettings).get(1, TimeUnit.SECONDS);
19481948

19491949

1950-
QuerySettings settings = new QuerySettings().setFormat(ClickHouseFormat.CSV);
1950+
QuerySettings settings = new QuerySettings().setFormat(ClickHouseFormat.CSV).serverSetting("output_format_json_quote_64bit_integers", "1");
19511951
try (QueryResponse resp = client.query("SELECT json FROM test_json_values", settings).get(1, TimeUnit.SECONDS)) {
19521952
BufferedReader reader = new BufferedReader(new InputStreamReader(resp.getInputStream()));
19531953
Assert.assertEquals(StringEscapeUtils.unescapeCsv(reader.lines().findFirst().get()), "{\"a\":{\"b\":\"42\"},\"c\":[\"1\",\"2\",\"3\"]}");
19541954
}
19551955

19561956
settings = new QuerySettings()
1957-
.serverSetting(ServerSettings.OUTPUT_FORMAT_BINARY_WRITE_JSON_AS_STRING, "1");
1957+
.serverSetting(ServerSettings.OUTPUT_FORMAT_BINARY_WRITE_JSON_AS_STRING, "1").serverSetting("output_format_json_quote_64bit_integers", "1");
19581958
try (QueryResponse resp = client.query("SELECT json FROM test_json_values", settings).get(1, TimeUnit.SECONDS)) {
19591959
ClickHouseBinaryFormatReader reader = client.newBinaryFormatReader(resp);
19601960
Assert.assertNotNull(reader.next());

jdbc-v2/src/main/java/com/clickhouse/jdbc/ConnectionImpl.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,6 @@ private void checkResultSetFlags(int resultSetType, int resultSetConcurrency, in
369369
throw new SQLFeatureNotSupportedException("Cannot create statement with result set concurrency other then ResultSet.CONCUR_READ_ONLY",
370370
ExceptionUtils.SQL_STATE_FEATURE_NOT_SUPPORTED);
371371
}
372-
if (resultSetHoldability != ResultSet.CLOSE_CURSORS_AT_COMMIT) {
373-
throw new SQLFeatureNotSupportedException("Cannot create statement with result set holdability other then ResultSet.CLOSE_CURSORS_AT_COMMIT",
374-
ExceptionUtils.SQL_STATE_FEATURE_NOT_SUPPORTED);
375-
}
376372
}
377373
}
378374

jdbc-v2/src/test/java/com/clickhouse/jdbc/ConnectionTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,11 @@ public void testCreateUnsupportedStatements() throws Throwable {
9999
Assert.ThrowingRunnable[] createStatements = new Assert.ThrowingRunnable[]{
100100
() -> conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY),
101101
() -> conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE),
102-
() -> conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT),
103102
() -> conn.prepareStatement("SELECT 1", Statement.RETURN_GENERATED_KEYS),
104103
() -> conn.prepareStatement("SELECT 1", new int[]{1}),
105104
() -> conn.prepareStatement("SELECT 1", new String[]{"1"}),
106105
() -> conn.prepareStatement("SELECT 1", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE),
107106
() -> conn.prepareStatement("SELECT 1", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY),
108-
() -> conn.prepareStatement("SELECT 1", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT),
109107
() -> conn.prepareCall("SELECT 1"),
110108
() -> conn.prepareCall("SELECT 1", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY),
111109
() -> conn.prepareCall("SELECT 1", ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT),

jdbc-v2/src/test/java/com/clickhouse/jdbc/DataTypeTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,15 +1404,15 @@ public void testJSONWritingAsString() throws SQLException {
14041404
double key1 = rand.nextDouble();
14051405
int key2 = rand.nextInt();
14061406
final String json = "{\"key1\": \"" + key1 + "\", \"key2\": " + key2 + ", \"key3\": [1000, \"value3\", 400000]}";
1407-
final String serverJson = "{\"key1\":\"" + key1 + "\",\"key2\":" + key2 + ",\"key3\":[\"1000\",\"value3\",\"400000\"]}";
1407+
final String serverJson = "{\"key1\":\"" + key1 + "\",\"key2\":\"" + key2 + "\",\"key3\":[\"1000\",\"value3\",\"400000\"]}";
14081408
insertData(String.format("INSERT INTO test_json VALUES ( 1, '%s' )", json));
14091409

14101410
// Check the results
14111411
Properties props = new Properties();
14121412
props.setProperty(
14131413
ClientConfigProperties.serverSetting(ServerSettings.OUTPUT_FORMAT_BINARY_WRITE_JSON_AS_STRING),
14141414
"1");
1415-
props.setProperty(ClientConfigProperties.serverSetting("output_format_json_quote_64bit_integers"), "0");
1415+
props.setProperty(ClientConfigProperties.serverSetting("output_format_json_quote_64bit_integers"), "1");
14161416
try (Connection conn = getJdbcConnection(props)) {
14171417
try (Statement stmt = conn.createStatement()) {
14181418
try (ResultSet rs = stmt.executeQuery("SELECT * FROM test_json ORDER BY order")) {

performance/src/main/java/com/clickhouse/benchmark/clients/Compression.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.clickhouse.benchmark.data.DataSet;
44
import com.clickhouse.client.api.internal.ClickHouseLZ4OutputStream;
5-
import com.clickhouse.client.internal.jpountz.lz4.LZ4Factory;
5+
import com.clickhouse.client.internal.net.jpountz.lz4.LZ4Factory;
66
import com.clickhouse.data.ClickHouseOutputStream;
77
import com.clickhouse.data.stream.Lz4OutputStream;
88
import org.openjdk.jmh.annotations.Benchmark;

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
7676

7777
<annotations-api.version>6.0.53</annotations-api.version>
78-
<apache.httpclient.version>5.3.1</apache.httpclient.version>
78+
<apache.httpclient.version>5.4.4</apache.httpclient.version>
7979
<arrow.version>12.0.1</arrow.version>
8080
<asm.version>9.7</asm.version>
8181
<avro.version>1.11.4</avro.version>

0 commit comments

Comments
 (0)