From f4d719c57e71a5c31920a85c40d36f5b7198c1f8 Mon Sep 17 00:00:00 2001 From: linghengqian Date: Mon, 25 Nov 2024 00:01:10 +0800 Subject: [PATCH] Partial support for connecting to embedded ClickHouse `chDB` --- .../infra/database/clickhouse/type/ClickHouseDatabaseType.java | 2 +- .../database/clickhouse/type/ClickHouseDatabaseTypeTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/database/type/clickhouse/src/main/java/org/apache/shardingsphere/infra/database/clickhouse/type/ClickHouseDatabaseType.java b/infra/database/type/clickhouse/src/main/java/org/apache/shardingsphere/infra/database/clickhouse/type/ClickHouseDatabaseType.java index 53510ae33e87bc..37143e1d610555 100644 --- a/infra/database/type/clickhouse/src/main/java/org/apache/shardingsphere/infra/database/clickhouse/type/ClickHouseDatabaseType.java +++ b/infra/database/type/clickhouse/src/main/java/org/apache/shardingsphere/infra/database/clickhouse/type/ClickHouseDatabaseType.java @@ -29,7 +29,7 @@ public final class ClickHouseDatabaseType implements DatabaseType { @Override public Collection getJdbcUrlPrefixes() { - return Arrays.asList("jdbc:ch:", "jdbc:clickhouse:"); + return Arrays.asList("jdbc:ch:", "jdbc:clickhouse:", "jdbc:chdb"); } @Override diff --git a/infra/database/type/clickhouse/src/test/java/org/apache/shardingsphere/infra/database/clickhouse/type/ClickHouseDatabaseTypeTest.java b/infra/database/type/clickhouse/src/test/java/org/apache/shardingsphere/infra/database/clickhouse/type/ClickHouseDatabaseTypeTest.java index 87e7dc7ed45d76..7d95f26c36b60e 100644 --- a/infra/database/type/clickhouse/src/test/java/org/apache/shardingsphere/infra/database/clickhouse/type/ClickHouseDatabaseTypeTest.java +++ b/infra/database/type/clickhouse/src/test/java/org/apache/shardingsphere/infra/database/clickhouse/type/ClickHouseDatabaseTypeTest.java @@ -30,6 +30,6 @@ class ClickHouseDatabaseTypeTest { @Test void assertGetJdbcUrlPrefixes() { - assertThat(TypedSPILoader.getService(DatabaseType.class, "ClickHouse").getJdbcUrlPrefixes(), is(Arrays.asList("jdbc:ch:", "jdbc:clickhouse:"))); + assertThat(TypedSPILoader.getService(DatabaseType.class, "ClickHouse").getJdbcUrlPrefixes(), is(Arrays.asList("jdbc:ch:", "jdbc:clickhouse:", "jdbc:chdb"))); } }