mirror of https://github.com/apache/druid.git
update avatica to handle additional character sets over jdbc (#10074)
* update avatica to handle additional character sets over jdbc * update license yaml, fix test * oops
This commit is contained in:
parent
572cd16e6f
commit
ec1f443a5c
|
@ -1295,7 +1295,7 @@ name: Apache Calcite Avatica
|
|||
license_category: binary
|
||||
module: java-core
|
||||
license_name: Apache License version 2.0
|
||||
version: 1.15.0
|
||||
version: 1.17.0
|
||||
libraries:
|
||||
- org.apache.calcite.avatica: avatica-core
|
||||
- org.apache.calcite.avatica: avatica-metrics
|
||||
|
@ -1303,13 +1303,13 @@ libraries:
|
|||
notices:
|
||||
- avatica-core: |
|
||||
Apache Calcite Avatica
|
||||
Copyright 2012-2018 The Apache Software Foundation
|
||||
Copyright 2012-2020 The Apache Software Foundation
|
||||
- avatica-metrics: |
|
||||
Apache Calcite Avatica Metrics
|
||||
Copyright 2012-2018 The Apache Software Foundation
|
||||
Copyright 2012-2020 The Apache Software Foundation
|
||||
- avatica-server: |
|
||||
Apache Calcite Avatica Server
|
||||
Copyright 2012-2018 The Apache Software Foundation
|
||||
Copyright 2012-2020 The Apache Software Foundation
|
||||
---
|
||||
|
||||
name: Apache Curator
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -81,7 +81,7 @@
|
|||
<apache.kafka.version>2.5.0</apache.kafka.version>
|
||||
<apache.ranger.version>2.0.0</apache.ranger.version>
|
||||
<apache.ranger.gson.version>2.2.4</apache.ranger.gson.version>
|
||||
<avatica.version>1.15.0</avatica.version>
|
||||
<avatica.version>1.17.0</avatica.version>
|
||||
<avro.version>1.9.2</avro.version>
|
||||
<calcite.version>1.21.0</calcite.version>
|
||||
<datasketches.version>1.3.0-incubating</datasketches.version>
|
||||
|
|
|
@ -991,6 +991,36 @@ public class DruidAvaticaHandlerTest extends CalciteTestBase
|
|||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExtendedCharacters() throws Exception
|
||||
{
|
||||
final ResultSet resultSet = client.createStatement().executeQuery(
|
||||
"SELECT COUNT(*) AS cnt FROM druid.lotsocolumns WHERE dimMultivalEnumerated = 'ㅑ ㅓ ㅕ ㅗ ㅛ ㅜ ㅠ ㅡ ㅣ'"
|
||||
);
|
||||
final List<Map<String, Object>> rows = getRows(resultSet);
|
||||
Assert.assertEquals(
|
||||
ImmutableList.of(
|
||||
ImmutableMap.of("cnt", 1L)
|
||||
),
|
||||
rows
|
||||
);
|
||||
|
||||
|
||||
PreparedStatement statement = client.prepareStatement(
|
||||
"SELECT COUNT(*) AS cnt FROM druid.lotsocolumns WHERE dimMultivalEnumerated = ?"
|
||||
);
|
||||
statement.setString(1, "ㅑ ㅓ ㅕ ㅗ ㅛ ㅜ ㅠ ㅡ ㅣ");
|
||||
final ResultSet resultSet2 = statement.executeQuery();
|
||||
final List<Map<String, Object>> rows2 = getRows(resultSet2);
|
||||
Assert.assertEquals(
|
||||
ImmutableList.of(
|
||||
ImmutableMap.of("cnt", 1L)
|
||||
),
|
||||
rows
|
||||
);
|
||||
Assert.assertEquals(rows, rows2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEscapingForGetColumns() throws Exception
|
||||
{
|
||||
|
|
|
@ -1261,7 +1261,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest
|
|||
1576306800000L,
|
||||
1L,
|
||||
"8",
|
||||
"[\"Baz\",\"World\",\"World\",\"World\"]",
|
||||
"[\"Baz\",\"World\",\"ㅑ ㅓ ㅕ ㅗ ㅛ ㅜ ㅠ ㅡ ㅣ\"]",
|
||||
useDefault ? "[\"\",\"Corundum\",\"Xylophone\"]" : "[null,\"Corundum\",\"Xylophone\"]",
|
||||
useDefault ? "" : null,
|
||||
"8",
|
||||
|
@ -1331,7 +1331,7 @@ public class CalciteQueryTest extends BaseCalciteQueryTest
|
|||
1576306800000L,
|
||||
1L,
|
||||
"8",
|
||||
"[\"Baz\",\"World\",\"World\",\"World\"]",
|
||||
"[\"Baz\",\"World\",\"ㅑ ㅓ ㅕ ㅗ ㅛ ㅜ ㅠ ㅡ ㅣ\"]",
|
||||
useDefault ? "[\"\",\"Corundum\",\"Xylophone\"]" : "[null,\"Corundum\",\"Xylophone\"]",
|
||||
useDefault ? "" : null,
|
||||
"8",
|
||||
|
|
|
@ -608,7 +608,7 @@ public class CalciteTests
|
|||
.put("metFloatNormal", 4999.0)
|
||||
.put("dimZipf", "9")
|
||||
.put("dimUniform", "50515")
|
||||
.put("dimMultivalEnumerated", Arrays.asList("Baz", "World", "World", "World"))
|
||||
.put("dimMultivalEnumerated", Arrays.asList("Baz", "World", "ㅑ ㅓ ㅕ ㅗ ㅛ ㅜ ㅠ ㅡ ㅣ"))
|
||||
.put("metLongSequential", 8)
|
||||
.put("dimHyperUnique", "8")
|
||||
.put("dimSequential", "8")
|
||||
|
|
|
@ -243,6 +243,23 @@ public class SqlResourceTest extends CalciteTestBase
|
|||
checkSqlRequestLog(true);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testCountStarExtendedCharacters() throws Exception
|
||||
{
|
||||
final List<Map<String, Object>> rows = doPost(
|
||||
new SqlQuery("SELECT COUNT(*) AS cnt FROM druid.lotsocolumns WHERE dimMultivalEnumerated = 'ㅑ ㅓ ㅕ ㅗ ㅛ ㅜ ㅠ ㅡ ㅣ'", null, false, null, null)
|
||||
).rhs;
|
||||
|
||||
Assert.assertEquals(
|
||||
ImmutableList.of(
|
||||
ImmutableMap.of("cnt", 1)
|
||||
),
|
||||
rows
|
||||
);
|
||||
checkSqlRequestLog(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTimestampsInResponse() throws Exception
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue