From 83f70bbcbc642b57719bb7b7662e0e12671028b8 Mon Sep 17 00:00:00 2001 From: linghengqian Date: Tue, 20 May 2025 22:16:58 +0800 Subject: [PATCH] Refactor ClickHouse's nativeTest --- .../graalvm-native-image/_index.cn.md | 6 +- .../graalvm-native-image/_index.en.md | 6 +- .../development/_index.cn.md | 2 +- .../development/_index.en.md | 4 +- .../optional-plugins/clickhouse/_index.cn.md | 2 +- .../optional-plugins/clickhouse/_index.en.md | 2 +- .../optional-plugins/hiveserver2/_index.cn.md | 10 - .../optional-plugins/hiveserver2/_index.en.md | 10 - .../docker-java-api/3.4.0/reflect-config.json | 17 +- .../reflect-config.json | 296 +++++++++++++----- .../resource-config.json | 54 ++++ .../reflect-config.json | 15 + .../junit-jupiter/5.11.1/reflect-config.json | 5 + pom.xml | 4 +- test/native/pom.xml | 113 ++++++- .../TcClickhouseDatabaseType.java | 46 +++ .../jdbc/databases/ClickHouseTest.java | 120 +------ ...here.infra.database.core.type.DatabaseType | 1 + .../test-native/sql/clickhouse-init.sql | 45 +++ .../yaml/jdbc/databases/clickhouse.yaml | 18 +- 20 files changed, 522 insertions(+), 254 deletions(-) create mode 100644 test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java create mode 100644 test/native/src/test/resources/test-native/sql/clickhouse-init.sql diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md index b54903fcd623c..8e06e54d4dd05 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md @@ -47,7 +47,7 @@ java.beans.Introspector was unintentionally initialized at build time. To see wh org.graalvm.buildtools native-maven-plugin - 0.10.5 + 0.10.6 true @@ -85,12 +85,12 @@ java.beans.Introspector was unintentionally initialized at build time. To see wh ```groovy plugins { - id 'org.graalvm.buildtools.native' version '0.10.5' + id 'org.graalvm.buildtools.native' version '0.10.6' } dependencies { implementation 'org.apache.shardingsphere:shardingsphere-jdbc:${shardingsphere.version}' - implementation(group: 'org.graalvm.buildtools', name: 'graalvm-reachability-metadata', version: '0.10.5', classifier: 'repository', ext: 'zip') + implementation(group: 'org.graalvm.buildtools', name: 'graalvm-reachability-metadata', version: '0.10.6', classifier: 'repository', ext: 'zip') } graalvmNative { diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md index 99a6cdd4a75c0..aa13f1bbf4d76 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md @@ -49,7 +49,7 @@ and the documentation of GraalVM Native Build Tools shall prevail. org.graalvm.buildtools native-maven-plugin - 0.10.5 + 0.10.6 true @@ -89,12 +89,12 @@ Reference https://github.com/graalvm/native-build-tools/issues/572 . ```groovy plugins { - id 'org.graalvm.buildtools.native' version '0.10.5' + id 'org.graalvm.buildtools.native' version '0.10.6' } dependencies { implementation 'org.apache.shardingsphere:shardingsphere-jdbc:${shardingsphere.version}' - implementation(group: 'org.graalvm.buildtools', name: 'graalvm-reachability-metadata', version: '0.10.5', classifier: 'repository', ext: 'zip') + implementation(group: 'org.graalvm.buildtools', name: 'graalvm-reachability-metadata', version: '0.10.6', classifier: 'repository', ext: 'zip') } graalvmNative { diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/development/_index.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/development/_index.cn.md index 1c7e19582e02d..28f4c7b05f119 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/development/_index.cn.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/development/_index.cn.md @@ -27,7 +27,7 @@ ShardingSphere 定义了, 1. GraalVM CE 22.0.2,或与 GraalVM CE 22.0.2 兼容的 GraalVM 下游发行版。以 [GraalVM Native Image](/cn/user-manual/shardingsphere-jdbc/graalvm-native-image) 为准。 2. 编译 GraalVM Native Image 所需要的本地工具链。以 https://www.graalvm.org/latest/reference-manual/native-image/#prerequisites 为准。 -3. 可运行 Linux Containers 的 Docker Engine,或与 testcontainer-java 兼容的 Container Runtime。以 https://java.testcontainers.org/supported_docker_environment/ 为准。 +3. 可运行 Linux Containers 的 Docker Engine,或与 testcontainers-java 兼容的 Container Runtime。以 https://java.testcontainers.org/supported_docker_environment/ 为准。 本文不讨论 `LLVM Backend for Native Image`。下文分别讨论在 Ubuntu,Windows 与 Windows Server 下可能的所需操作。 diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/development/_index.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/development/_index.en.md index bb3979e59b9d3..a45cf96da6dff 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/development/_index.en.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/development/_index.en.md @@ -29,7 +29,7 @@ Developer must have installed on their devices, 1. GraalVM CE 22.0.2, or a GraalVM downstream distribution compatible with GraalVM CE 22.0.2. Refer to [GraalVM Native Image](/en/user-manual/shardingsphere-jdbc/graalvm-native-image). 2. The native toolchain required to compile the GraalVM Native Image. Refer to https://www.graalvm.org/latest/reference-manual/native-image/#prerequisites . -3. Docker Engine that can run Linux Containers, or a Container Runtime compatible with testcontainer-java. Refer to https://java.testcontainers.org/supported_docker_environment/ . +3. Docker Engine that can run Linux Containers, or a Container Runtime compatible with testcontainers-java. Refer to https://java.testcontainers.org/supported_docker_environment/ . This article does not discuss `LLVM Backend for Native Image`. The following sections discuss the possible required operations under Ubuntu, Windows, and Windows Server. @@ -141,7 +141,7 @@ Developer can use the following commands to compile the GraalVM Native Image req ```shell git clone git@github.com:apache/shardingsphere.git cd ./shardingsphere/ -./mvnw -PgenerateMetadata -e -T 1C clean test +./mvnw -PnativeTestInShardingSphere -e -T 1C clean test ``` When Windows pops up a window asking developer to allow an app with a path like `C:\users\shard\shardingsphere\test\native\target\native-tests.exe.exe` to pass through Windows Firewall, diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md index fc097a8bbcb70..c4ff7abbee61b 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.cn.md @@ -43,7 +43,7 @@ ShardingSphere 对 ClickHouse JDBC Driver 的支持位于可选模块中。 ```yaml services: clickhouse-server: - image: clickhouse/clickhouse-server:24.11.1.2557 + image: clickhouse/clickhouse-server:25.4.5.24 ports: - "8123:8123" ``` diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md index e6dc45e38d4b1..1dfb22db5de4f 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/clickhouse/_index.en.md @@ -43,7 +43,7 @@ Write a Docker Compose file to start ClickHouse. ```yaml services: clickhouse-server: - image: clickhouse/clickhouse-server:24.11.1.2557 + image: clickhouse/clickhouse-server:25.4.5.24 ports: - "8123:8123" ``` diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md index f4d891933bb68..2041da71989dc 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.cn.md @@ -20,11 +20,6 @@ ShardingSphere 对 HiveServer2 JDBC Driver 的支持位于可选模块中。 shardingsphere-jdbc ${shardingsphere.version} - - org.apache.shardingsphere - shardingsphere-infra-database-hive - ${shardingsphere.version} - org.apache.shardingsphere shardingsphere-parser-sql-hive @@ -67,11 +62,6 @@ ShardingSphere 对 HiveServer2 JDBC Driver 的支持位于可选模块中。 shardingsphere-jdbc ${shardingsphere.version} - - org.apache.shardingsphere - shardingsphere-infra-database-hive - ${shardingsphere.version} - org.apache.shardingsphere shardingsphere-parser-sql-hive diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md index 4e188e525faa9..d8b17b371e769 100644 --- a/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md +++ b/docs/document/content/user-manual/shardingsphere-jdbc/optional-plugins/hiveserver2/_index.en.md @@ -21,11 +21,6 @@ The possible Maven dependencies are as follows. shardingsphere-jdbc ${shardingsphere.version} - - org.apache.shardingsphere - shardingsphere-infra-database-hive - ${shardingsphere.version} - org.apache.shardingsphere shardingsphere-parser-sql-hive @@ -69,11 +64,6 @@ The following is an example of a possible configuration, shardingsphere-jdbc ${shardingsphere.version} - - org.apache.shardingsphere - shardingsphere-infra-database-hive - ${shardingsphere.version} - org.apache.shardingsphere shardingsphere-parser-sql-hive diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/com.github.docker-java/docker-java-api/3.4.0/reflect-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/com.github.docker-java/docker-java-api/3.4.0/reflect-config.json index 1b86435142d6c..e3eceb40e5da5 100644 --- a/infra/reachability-metadata/src/main/resources/META-INF/native-image/com.github.docker-java/docker-java-api/3.4.0/reflect-config.json +++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/com.github.docker-java/docker-java-api/3.4.0/reflect-config.json @@ -649,28 +649,35 @@ "allDeclaredMethods": true }, { - "condition":{"typeReachable":"org.testcontainers.shaded.com.fasterxml.jackson.databind.util.ClassUtil"}, + "condition":{"typeReachable":"com.github.dockerjava.api.model.PullResponseItem"}, "name":"com.github.dockerjava.api.model.PullResponseItem", "allDeclaredMethods": true }, { - "condition":{"typeReachable":"org.testcontainers.shaded.com.fasterxml.jackson.databind.util.ClassUtil"}, + "condition":{"typeReachable":"com.github.dockerjava.api.model.ResponseItem"}, "name":"com.github.dockerjava.api.model.ResponseItem", "allDeclaredMethods": true }, { - "condition":{"typeReachable":"org.testcontainers.shaded.com.fasterxml.jackson.databind.util.ClassUtil"}, + "condition":{"typeReachable":"com.github.dockerjava.api.model.ResponseItem"}, "name":"com.github.dockerjava.api.model.ResponseItem$AuxDetail", "allDeclaredMethods": true }, { - "condition":{"typeReachable":"org.testcontainers.shaded.com.fasterxml.jackson.databind.util.ClassUtil"}, + "condition":{"typeReachable":"com.github.dockerjava.api.model.ResponseItem"}, "name":"com.github.dockerjava.api.model.ResponseItem$ErrorDetail", "allDeclaredMethods": true }, { - "condition":{"typeReachable":"org.testcontainers.shaded.com.fasterxml.jackson.databind.util.ClassUtil"}, + "condition":{"typeReachable":"com.github.dockerjava.api.model.ResponseItem"}, "name":"com.github.dockerjava.api.model.ResponseItem$ProgressDetail", "allDeclaredMethods": true +}, +{ + "condition":{"typeReachable":"com.github.dockerjava.api.model.ImageOptions"}, + "name":"com.github.dockerjava.api.model.ImageOptions", + "allDeclaredFields":true, + "allDeclaredMethods": true, + "allDeclaredConstructors":true } ] diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json index abed562fc4a99..74ffdfdf60029 100644 --- a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json +++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json @@ -3,6 +3,10 @@ "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "name":"JdkLogger" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[B" +}, { "condition":{"typeReachable":"org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader"}, "name":"[Lcom.fasterxml.jackson.databind.deser.BeanDeserializerModifier;" @@ -13,6 +17,58 @@ }, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.Bind;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.Capability;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.Device;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.ExposedPort;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.Link;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.LxcConf;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.PortBinding;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.Ports$Binding;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.Ulimit;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.Volume;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.VolumeBind;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.VolumeRW;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lcom.github.dockerjava.api.model.VolumesFrom;" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement"}, "name":"[Lcom.github.dockerjava.api.model.VolumesFrom;" }, { @@ -95,6 +151,10 @@ "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "name":"[Ljava.lang.String;" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement"}, + "name":"[Ljava.lang.String;" +}, { "condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"}, "name":"[Ljava.lang.String;" @@ -127,6 +187,10 @@ "condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"}, "name":"[Ljava.sql.Statement;" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"[Lorg.testcontainers.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializerModifier;" +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.util.yaml.YamlEngine"}, "name":"java.beans.PropertyVetoException" @@ -147,6 +211,11 @@ "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.io.BufferedWriter" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.io.Closeable", + "queryAllDeclaredMethods":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.io.Closeable", @@ -208,6 +277,11 @@ "queryAllDeclaredMethods":true, "methods":[{"name":"close","parameterTypes":[] }, {"name":"read","parameterTypes":["java.nio.CharBuffer"] }] }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.io.Serializable", + "queryAllDeclaredMethods":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.io.Serializable", @@ -225,6 +299,11 @@ "queryAllDeclaredMethods":true, "queryAllPublicMethods":true }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.lang.AutoCloseable", + "queryAllDeclaredMethods":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.lang.AutoCloseable", @@ -235,6 +314,13 @@ "condition":{"typeReachable":"org.apache.shardingsphere.mode.repository.cluster.etcd.EtcdRepository"}, "name":"java.lang.BaseVirtualThread" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.lang.Boolean", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.lang.Boolean" @@ -268,6 +354,11 @@ "name":"java.lang.Cloneable", "queryAllDeclaredMethods":true }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.lang.Comparable", + "queryAllDeclaredMethods":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.lang.Comparable", @@ -278,6 +369,11 @@ "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.lang.Double" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.lang.Enum", + "queryAllDeclaredMethods":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.lang.Enum", @@ -288,6 +384,13 @@ "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.lang.Float" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.lang.Integer", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.lang.Integer" @@ -298,14 +401,32 @@ "queryAllDeclaredMethods":true, "queryAllPublicMethods":true }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.lang.Long", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.lang.Long" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.lang.Number", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.lang.Number" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.lang.Object", + "queryAllDeclaredMethods":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor"}, "name":"java.lang.Object", @@ -463,11 +584,21 @@ "name":"java.lang.Throwable", "methods":[{"name":"getSuppressed","parameterTypes":[] }] }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.lang.constant.Constable", + "queryAllDeclaredMethods":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.lang.constant.Constable", "queryAllDeclaredMethods":true }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.lang.constant.ConstantDesc", + "queryAllDeclaredMethods":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.mode.repository.cluster.etcd.EtcdRepository"}, "name":"java.lang.management.ManagementFactory", @@ -587,6 +718,12 @@ "queryAllDeclaredMethods":true, "methods":[{"name":"clear","parameterTypes":[] }, {"name":"containsKey","parameterTypes":["java.lang.Object"] }, {"name":"containsValue","parameterTypes":["java.lang.Object"] }, {"name":"entrySet","parameterTypes":[] }, {"name":"equals","parameterTypes":["java.lang.Object"] }, {"name":"get","parameterTypes":["java.lang.Object"] }, {"name":"hashCode","parameterTypes":[] }, {"name":"isEmpty","parameterTypes":[] }, {"name":"keySet","parameterTypes":[] }, {"name":"put","parameterTypes":["java.lang.Object","java.lang.Object"] }, {"name":"putAll","parameterTypes":["java.util.Map"] }, {"name":"remove","parameterTypes":["java.lang.Object"] }, {"name":"size","parameterTypes":[] }, {"name":"values","parameterTypes":[] }] }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.util.ArrayList", + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.util.BitSet" @@ -611,11 +748,23 @@ "name":"java.util.Enumeration", "queryAllPublicMethods":true }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.util.HashMap", + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.expr.groovy.GroovyInlineExpressionParser"}, "name":"java.util.Iterator", "queryAllPublicMethods":true }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.util.LinkedHashMap", + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, { "condition":{"typeReachable":"org.apache.shardingsphere.broadcast.rule.changed.BroadcastTableChangedProcessor"}, "name":"java.util.LinkedHashSet", @@ -718,6 +867,11 @@ "name":"java.util.concurrent.Future", "queryAllPublicMethods":true }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "name":"java.util.concurrent.atomic.AtomicMarkableReference", + "fields":[{"name":"pair"}] +}, { "condition":{"typeReachable":"org.apache.shardingsphere.mode.repository.cluster.etcd.EtcdRepository"}, "name":"java.util.concurrent.atomic.LongAdder", @@ -829,6 +983,14 @@ "condition":{"typeReachable":"org.apache.shardingsphere.authority.rule.AuthorityRule"}, "name":"org.apache.shardingsphere.authority.provider.simple.AllPermittedPrivilegeProvider" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.authority.rule.builder.AuthorityRuleBuilder" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.authority.rule.builder.DefaultAuthorityRuleConfigurationBuilder" +}, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "name":"org.apache.shardingsphere.authority.yaml.config.YamlAuthorityRuleConfiguration", @@ -1287,6 +1449,14 @@ "condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.connector.ProxyDatabaseConnectionManager"}, "name":"org.apache.shardingsphere.globalclock.executor.GlobalClockTransactionHook" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.globalclock.rule.builder.DefaultGlobalClockRuleConfigurationBuilder" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.globalclock.rule.builder.GlobalClockRuleBuilder" +}, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "name":"org.apache.shardingsphere.globalclock.yaml.config.YamlGlobalClockRuleConfiguration", @@ -1430,10 +1600,6 @@ "condition":{"typeReachable":"org.apache.shardingsphere.infra.binder.context.segment.select.projection.extractor.ProjectionIdentifierExtractEngine"}, "name":"org.apache.shardingsphere.infra.binder.opengauss.OpenGaussProjectionIdentifierExtractor" }, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.infra.binder.context.segment.select.projection.extractor.ProjectionIdentifierExtractEngine"}, - "name":"org.apache.shardingsphere.infra.binder.oracle.OracleProjectionIdentifierExtractor" -}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.binder.context.segment.select.projection.extractor.ProjectionIdentifierExtractEngine"}, "name":"org.apache.shardingsphere.infra.binder.postgresql.PostgreSQLProjectionIdentifierExtractor" @@ -1530,18 +1696,6 @@ "condition":{"typeReachable":"org.apache.shardingsphere.infra.database.core.type.DatabaseTypeFactory"}, "name":"org.apache.shardingsphere.infra.database.opengauss.type.OpenGaussDatabaseType" }, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.infra.database.core.metadata.data.loader.MetaDataLoader"}, - "name":"org.apache.shardingsphere.infra.database.oracle.metadata.data.loader.OracleMetaDataLoader" -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.infra.database.core.type.DatabaseTypeRegistry"}, - "name":"org.apache.shardingsphere.infra.database.oracle.metadata.database.OracleDatabaseMetaData" -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.infra.database.core.type.DatabaseTypeFactory"}, - "name":"org.apache.shardingsphere.infra.database.oracle.type.OracleDatabaseType" -}, { "condition":{"typeReachable":"org.apache.shardingsphere.transaction.xa.XAShardingSphereTransactionManager"}, "name":"org.apache.shardingsphere.infra.database.postgresql.checker.PostgreSQLDatabasePrivilegeChecker" @@ -1822,59 +1976,6 @@ "name":"org.apache.shardingsphere.infra.yaml.schema.pojo.YamlShardingSphereTable", "queryAllPublicMethods":true }, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration", - "queryAllPublicMethods":true -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.infra.yaml.config.shortcut.YamlRuleConfigurationShortcuts"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration" -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration", - "queryAllPublicMethods":true -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.standalone.StandaloneContextManagerBuilder"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration" -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.mode.metadata.factory.MetaDataContextsFactory"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration" -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.mode.metadata.factory.init.type.LocalConfigurationMetaDataContextsInitFactory"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration" -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.mode.metadata.persist.MetaDataPersistFacade"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration" -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.mode.metadata.persist.config.global.GlobalRulePersistService"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration" -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.mode.node.rule.tuple.YamlRuleNodeTupleSwapperEngine"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration", - "allDeclaredFields":true, - "methods":[{"name":"getAppenders","parameterTypes":[] }, {"name":"getLoggers","parameterTypes":[] }] -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration", - "queryAllPublicMethods":true -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfigurationBeanInfo" -}, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, - "name":"org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfigurationCustomizer" -}, { "condition":{"typeReachable":"org.apache.shardingsphere.mask.checker.MaskRuleConfigurationChecker"}, "name":"org.apache.shardingsphere.mask.algorithm.cover.KeepFirstNLastMMaskAlgorithm", @@ -2499,6 +2600,14 @@ "condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.handler.ProxySQLComQueryParser"}, "name":"org.apache.shardingsphere.parser.distsql.parser.facade.SQLParserDistSQLParserFacade" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.parser.rule.builder.DefaultSQLParserRuleConfigurationBuilder" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.parser.rule.builder.SQLParserRuleBuilder" +}, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.util.yaml.YamlEngine"}, "name":"org.apache.shardingsphere.parser.yaml.config.YamlSQLParserCacheOptionRuleConfiguration", @@ -3556,11 +3665,6 @@ "name":"org.apache.shardingsphere.sql.parser.opengauss.visitor.statement.type.OpenGaussDMLStatementVisitor", "methods":[{"name":"","parameterTypes":[] }] }, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.sql.parser.core.database.visitor.SQLStatementVisitorFactory"}, - "name":"org.apache.shardingsphere.sql.parser.oracle.visitor.statement.OracleStatementVisitorFacade", - "methods":[{"name":"","parameterTypes":[] }] -}, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement"}, "name":"org.apache.shardingsphere.sql.parser.postgresql.parser.PostgreSQLLexer", @@ -3776,10 +3880,6 @@ "name":"org.apache.shardingsphere.sql.parser.statement.sqlserver.dml.SQLServerSelectStatement", "methods":[{"name":"","parameterTypes":[] }] }, -{ - "condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.handler.ProxySQLComQueryParser"}, - "name":"org.apache.shardingsphere.sqlfederation.distsql.parser.facade.SQLFederationDistSQLParserFacade" -}, { "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.ConnectionConfigBuilderFactory"}, "name":"org.apache.shardingsphere.sqlfederation.compiler.context.connection.config.impl.H2ConnectionConfigBuilder" @@ -3810,11 +3910,11 @@ }, { "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.schema.CalciteSchemaBuilder"}, - "name":"org.apache.shardingsphere.sqlfederation.compiler.function.mysql.impl.MySQLBinFunction" + "name":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.impl.MySQLBinFunction" }, { "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.context.schema.CalciteSchemaBuilder$$Lambda/0x0000027d0c57d148"}, - "name":"org.apache.shardingsphere.sqlfederation.compiler.function.mysql.impl.MySQLBinFunction" + "name":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.impl.MySQLBinFunction" }, { "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.MySQLFunctionRegister"}, @@ -3832,6 +3932,18 @@ "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql.PostgreSQLFunctionRegister"}, "name":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql.impl.PostgreSQLSystemFunction" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.handler.ProxySQLComQueryParser"}, + "name":"org.apache.shardingsphere.sqlfederation.distsql.parser.facade.SQLFederationDistSQLParserFacade" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.sqlfederation.rule.builder.DefaultSQLFederationRuleConfigurationBuilder" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.sqlfederation.rule.builder.SQLFederationRuleBuilder" +}, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "name":"org.apache.shardingsphere.sqlfederation.yaml.config.YamlSQLFederationRuleConfiguration", @@ -3893,6 +4005,14 @@ "condition":{"typeReachable":"org.apache.shardingsphere.sqltranslator.rule.SQLTranslatorRule"}, "name":"org.apache.shardingsphere.sqltranslator.natived.NativeSQLTranslator" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.sqltranslator.rule.builder.DefaultSQLTranslatorRuleConfigurationBuilder" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.sqltranslator.rule.builder.SQLTranslatorRuleBuilder" +}, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "name":"org.apache.shardingsphere.sqltranslator.yaml.config.YamlSQLTranslatorRuleConfiguration", @@ -3946,6 +4066,14 @@ "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "name":"org.apache.shardingsphere.sqltranslator.yaml.config.YamlSQLTranslatorRuleConfigurationCustomizer" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.timeservice.core.rule.builder.DefaultTimestampServiceConfigurationBuilder" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.timeservice.core.rule.builder.TimestampServiceRuleBuilder" +}, { "condition":{"typeReachable":"org.apache.shardingsphere.timeservice.core.rule.TimestampServiceRule"}, "name":"org.apache.shardingsphere.timeservice.type.system.SystemTimestampService", @@ -3965,6 +4093,14 @@ "condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.handler.ProxySQLComQueryParser"}, "name":"org.apache.shardingsphere.transaction.distsql.parser.facade.TransactionDistSQLParserFacade" }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.transaction.rule.builder.DefaultTransactionRuleConfigurationBuilder" +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "name":"org.apache.shardingsphere.transaction.rule.builder.TransactionRuleBuilder" +}, { "condition":{"typeReachable":"org.apache.shardingsphere.transaction.ShardingSphereTransactionManagerEngine"}, "name":"org.apache.shardingsphere.transaction.xa.XAShardingSphereTransactionManager", diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json index fe00288cd2c0f..28985c3a39c94 100644 --- a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json +++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json @@ -78,6 +78,15 @@ }, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement"}, "pattern":"\\QMETA-INF/services/com.clickhouse.client.ClickHouseClient\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\QMETA-INF/services/com.clickhouse.client.ClickHouseRequestManager\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\QMETA-INF/services/com.clickhouse.data.ClickHouseDataStreamFactory\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\QMETA-INF/services/com.clickhouse.jdbc.JdbcTypeMapping\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.mode.repository.cluster.etcd.EtcdRepository"}, "pattern":"\\QMETA-INF/services/io.grpc.LoadBalancerProvider\\E" @@ -117,6 +126,9 @@ }, { "condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.postgresql.handler.admin.executor.variable.charset.PostgreSQLCharacterSets"}, "pattern":"\\QMETA-INF/services/java.nio.charset.spi.CharsetProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\QMETA-INF/services/java.time.zone.ZoneRulesProvider\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "pattern":"\\QMETA-INF/services/javax.xml.datatype.DatatypeFactory\\E" @@ -258,6 +270,12 @@ }, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.database.DatabaseRulesBuilder"}, "pattern":"\\QMETA-INF/services/org.apache.shardingsphere.infra.rule.builder.database.DefaultDatabaseRuleConfigurationBuilder\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "pattern":"\\QMETA-INF/services/org.apache.shardingsphere.infra.rule.builder.global.DefaultGlobalRuleConfigurationBuilder\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.infra.rule.builder.global.GlobalRulesBuilder"}, + "pattern":"\\QMETA-INF/services/org.apache.shardingsphere.infra.rule.builder.global.GlobalRuleBuilder\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.url.core.ShardingSphereURLLoadEngine"}, "pattern":"\\QMETA-INF/services/org.apache.shardingsphere.infra.url.spi.ShardingSphereURLLoader\\E" @@ -336,15 +354,27 @@ }, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "pattern":"\\QMETA-INF/services/org.testcontainers.containers.JdbcDatabaseContainerProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement"}, + "pattern":"\\QMETA-INF/services/org.testcontainers.containers.JdbcDatabaseContainerProvider\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"}, "pattern":"\\QMETA-INF/services/org.testcontainers.containers.JdbcDatabaseContainerProvider\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "pattern":"\\QMETA-INF/services/org.testcontainers.core.CreateContainerCmdModifier\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement"}, + "pattern":"\\QMETA-INF/services/org.testcontainers.core.CreateContainerCmdModifier\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"}, "pattern":"\\QMETA-INF/services/org.testcontainers.core.CreateContainerCmdModifier\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\QMETA-INF/services/org.testcontainers.dockerclient.DockerClientProviderStrategy\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\QMETA-INF/services/org.testcontainers.utility.ImageNameSubstitutor\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.transaction.base.seata.at.SeataATShardingSphereTransactionManager"}, "pattern":"\\Q\\E" @@ -357,6 +387,12 @@ }, { "condition":{"typeReachable":"org.apache.shardingsphere.transaction.xa.atomikos.manager.AtomikosTransactionManagerProvider"}, "pattern":"\\Qcom/atomikos/icatch/provider/imp/transactions.properties\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\Qcom/clickhouse/client/internal/jpountz/util/win32/amd64/liblz4-java.so\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\Qcom/github/dockerjava/zerodep/shaded/org/apache/hc/client5/version.properties\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "pattern":"\\Qcontainer-license-acceptance.txt\\E" @@ -369,6 +405,9 @@ }, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.autogen.version.ShardingSphereVersion"}, "pattern":"\\Qcurrent-git-commit.properties\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\Qdocker-java.properties\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.database.hive.metadata.data.loader.HiveMetaDataLoader"}, "pattern":"\\Qhive-default.xml\\E" @@ -396,6 +435,9 @@ }, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.database.hive.metadata.data.loader.HiveMetaDataLoader"}, "pattern":"\\Qmapred-site.xml\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\Qmozilla/public-suffix-list.txt\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.database.hive.metadata.data.loader.HiveMetaDataLoader"}, "pattern":"\\Qorg/apache/hadoop/hive/conf/HiveConf.class\\E" @@ -1956,6 +1998,12 @@ }, { "condition":{"typeReachable":"org.apache.shardingsphere.mode.repository.standalone.jdbc.sql.JDBCRepositorySQLLoader"}, "pattern":"\\Qsql\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\Qtest-native/sql/clickhouse-init.sql\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement"}, + "pattern":"\\Qtest-native/sql/clickhouse-init.sql\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, "pattern":"\\Qtest-native/sql/seata-script-client-at-postgresql.sql\\E" @@ -2022,6 +2070,9 @@ }, { "condition":{"typeReachable":"org.apache.shardingsphere.infra.url.classpath.ClassPathURLLoader"}, "pattern":"\\Qtest-native/yaml/jdbc/transactions/xa/narayana.yaml\\E" + }, { + "condition":{"typeReachable":"org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource"}, + "pattern":"\\Qtestcontainers.properties\\E" }, { "condition":{"typeReachable":"org.apache.shardingsphere.transaction.xa.atomikos.manager.AtomikosTransactionManagerProvider"}, "pattern":"\\Qtransactions-defaults.properties\\E" @@ -2062,5 +2113,8 @@ "bundles":[{ "name":"com.sun.org.apache.xml.internal.serializer.XMLEntities", "locales":["zh-CN"] + }, { + "name":"sun.text.resources.cldr.FormatData", + "locales":["en"] }] } \ No newline at end of file diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json index f8ba5f97e983e..24da477d417b2 100644 --- a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json +++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/shardingsphere-infra-reachability-metadata/reflect-config.json @@ -442,6 +442,21 @@ "name":"org.apache.shardingsphere.sqlfederation.compiler.function.opengauss.impl.OpenGaussSystemFunction", "allPublicMethods": true }, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.MySQLFunctionRegister"}, + "name":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.mysql.impl.MySQLBinFunction", + "allPublicMethods": true +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.opengauss.OpenGaussFunctionRegister"}, + "name":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.opengauss.impl.OpenGaussSystemFunction", + "allPublicMethods": true +}, +{ + "condition":{"typeReachable":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql.PostgreSQLFunctionRegister"}, + "name":"org.apache.shardingsphere.sqlfederation.compiler.sql.function.postgresql.impl.PostgreSQLSystemFunction", + "allPublicMethods": true +}, { "condition":{"typeReachable":"javax.security.auth.login.Configuration"}, "name":"sun.security.provider.ConfigFile", diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.junit.jupiter/junit-jupiter/5.11.1/reflect-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.junit.jupiter/junit-jupiter/5.11.1/reflect-config.json index 3e5dc7835e6d3..1dfa2044f8042 100644 --- a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.junit.jupiter/junit-jupiter/5.11.1/reflect-config.json +++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.junit.jupiter/junit-jupiter/5.11.1/reflect-config.json @@ -38,5 +38,10 @@ "condition":{"typeReachable":"org.junit.platform.commons.util.AnnotationUtils"}, "name":"org.junit.jupiter.api.condition.DisabledOnOs", "allPublicMethods": true +}, +{ + "condition":{"typeReachable":"org.junit.platform.commons.util.AnnotationUtils"}, + "name":"org.junit.jupiter.api.Disabled", + "allPublicMethods": true } ] diff --git a/pom.xml b/pom.xml index 8b4395818e15d..73a12dc390e15 100644 --- a/pom.xml +++ b/pom.xml @@ -148,7 +148,7 @@ 3.0 4.11.0 4.2.2 - 1.20.3 + 1.21.0 1.9.0 24.1.2 @@ -158,7 +158,7 @@ 0.6.1 1.4.13 0.3.1 - 0.10.5 + 0.10.6 1.0.0 diff --git a/test/native/pom.xml b/test/native/pom.xml index 2658bf6405fbc..9c0db56abadf6 100644 --- a/test/native/pom.xml +++ b/test/native/pom.xml @@ -33,63 +33,151 @@ ${project.version} test + + org.apache.shardingsphere shardingsphere-proxy-bootstrap ${project.version} test + + + org.apache.shardingsphere + shardingsphere-proxy-dialect-postgresql + + + org.apache.shardingsphere + shardingsphere-proxy-dialect-mysql + + + org.apache.shardingsphere + shardingsphere-proxy-dialect-oracle + + + org.apache.shardingsphere + shardingsphere-proxy-dialect-sqlserver + + + org.apache.shardingsphere + shardingsphere-proxy-dialect-opengauss + + + + + org.apache.shardingsphere + shardingsphere-parser-sql-postgresql + ${project.version} + test + + + org.apache.shardingsphere + shardingsphere-infra-binder-postgresql + ${project.version} + test + + + org.apache.shardingsphere + shardingsphere-postgresql-protocol + ${project.version} + test + + + org.apache.shardingsphere + shardingsphere-proxy-frontend-postgresql + ${project.version} + test + + + org.apache.shardingsphere + shardingsphere-data-pipeline-postgresql + ${project.version} + test + + + org.apache.shardingsphere + shardingsphere-parser-sql-mysql + ${project.version} + test - org.apache.shardingsphere - shardingsphere-proxy-dialect-postgresql + shardingsphere-infra-binder-mysql ${project.version} test org.apache.shardingsphere - shardingsphere-proxy-dialect-mysql + shardingsphere-mysql-protocol ${project.version} test org.apache.shardingsphere - shardingsphere-proxy-dialect-oracle + shardingsphere-proxy-frontend-mysql ${project.version} test org.apache.shardingsphere - shardingsphere-proxy-dialect-sqlserver + shardingsphere-data-pipeline-mysql ${project.version} test org.apache.shardingsphere - shardingsphere-proxy-dialect-opengauss + shardingsphere-parser-sql-sqlserver ${project.version} test org.apache.shardingsphere - shardingsphere-proxy-dialect-clickhouse + shardingsphere-parser-sql-opengauss ${project.version} test org.apache.shardingsphere - shardingsphere-proxy-dialect-hive + shardingsphere-infra-binder-opengauss ${project.version} + test org.apache.shardingsphere - shardingsphere-proxy-dialect-hive + shardingsphere-opengauss-protocol ${project.version} test org.apache.shardingsphere - shardingsphere-proxy-dialect-firebird + shardingsphere-proxy-frontend-opengauss + ${project.version} + test + + + org.apache.shardingsphere + shardingsphere-data-pipeline-opengauss + ${project.version} + test + + + + org.apache.shardingsphere + shardingsphere-parser-sql-clickhouse + ${project.version} + test + + + org.apache.shardingsphere + shardingsphere-parser-sql-hive + ${project.version} + test + + + org.apache.shardingsphere + shardingsphere-parser-sql-firebird ${project.version} test @@ -254,6 +342,11 @@ mssqlserver test + + org.testcontainers + clickhouse + test + org.apache.curator curator-test diff --git a/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java new file mode 100644 index 0000000000000..4429834bad3ae --- /dev/null +++ b/test/native/src/test/java/org/apache/shardingsphere/test/natived/commons/algorithm/testcontainers/TcClickhouseDatabaseType.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers; + +import org.apache.shardingsphere.infra.database.core.type.DatabaseType; +import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; + +import java.util.Collection; +import java.util.Collections; +import java.util.Optional; + +/** + * Database type of Clickhouse in testcontainers. + */ +public final class TcClickhouseDatabaseType implements TestcontainersDatabaseType { + + @Override + public Collection getJdbcUrlPrefixes() { + return Collections.singleton("jdbc:tc:clickhouse:"); + } + + @Override + public Optional getTrunkDatabaseType() { + return Optional.of(TypedSPILoader.getService(DatabaseType.class, "ClickHouse")); + } + + @Override + public String getType() { + return "TC-Clickhouse"; + } +} diff --git a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java index 24131913f6aff..0ee4eea130a47 100644 --- a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java +++ b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/ClickHouseTest.java @@ -24,54 +24,22 @@ import org.apache.shardingsphere.infra.metadata.database.resource.unit.StorageUnit; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.test.natived.commons.TestShardingService; -import org.awaitility.Awaitility; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledInNativeImage; -import org.testcontainers.containers.GenericContainer; -import org.testcontainers.junit.jupiter.Container; +import org.testcontainers.jdbc.ContainerDatabaseDriver; import org.testcontainers.junit.jupiter.Testcontainers; import javax.sql.DataSource; import java.sql.Connection; -import java.sql.DriverManager; import java.sql.SQLException; -import java.sql.Statement; -import java.time.Duration; -import java.util.Properties; -import java.util.stream.Stream; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.nullValue; - -/** - * Cannot use testcontainers-java style jdbcURL for Clickhouse Server due to unresolved - * testcontainers/testcontainers-java#8736. - */ -@SuppressWarnings({"SqlNoDataSourceInspection", "resource"}) @EnabledInNativeImage @Testcontainers class ClickHouseTest { - @Container - private final GenericContainer container = new GenericContainer<>("clickhouse/clickhouse-server:24.11.1.2557") - .withExposedPorts(8123); - - private final String systemPropKeyPrefix = "fixture.test-native.yaml.database.clickhouse."; - private DataSource logicDataSource; - private String jdbcUrlPrefix; - - @BeforeEach - void beforeEach() { - assertThat(System.getProperty(systemPropKeyPrefix + "ds0.jdbc-url"), is(nullValue())); - assertThat(System.getProperty(systemPropKeyPrefix + "ds1.jdbc-url"), is(nullValue())); - assertThat(System.getProperty(systemPropKeyPrefix + "ds2.jdbc-url"), is(nullValue())); - } - @AfterEach void afterEach() throws SQLException { try (Connection connection = logicDataSource.getConnection()) { @@ -81,92 +49,16 @@ void afterEach() throws SQLException { } contextManager.close(); } - System.clearProperty(systemPropKeyPrefix + "ds0.jdbc-url"); - System.clearProperty(systemPropKeyPrefix + "ds1.jdbc-url"); - System.clearProperty(systemPropKeyPrefix + "ds2.jdbc-url"); + ContainerDatabaseDriver.killContainers(); } @Test void assertShardingInLocalTransactions() throws SQLException { - jdbcUrlPrefix = "jdbc:ch://localhost:" + container.getMappedPort(8123) + "/"; - logicDataSource = createDataSource(); - TestShardingService testShardingService = new TestShardingService(logicDataSource); - testShardingService.processSuccessInClickHouse(); - } - - private Connection openConnection(final String databaseName) throws SQLException { - Properties props = new Properties(); - props.setProperty("user", "default"); - props.setProperty("password", ""); - return DriverManager.getConnection(jdbcUrlPrefix + databaseName, props); - } - - private DataSource createDataSource() throws SQLException { - Awaitility.await().atMost(Duration.ofMinutes(1L)).ignoreExceptions().until(() -> { - openConnection("default").close(); - return true; - }); - try ( - Connection connection = openConnection("default"); - Statement statement = connection.createStatement()) { - statement.executeUpdate("CREATE DATABASE demo_ds_0"); - statement.executeUpdate("CREATE DATABASE demo_ds_1"); - statement.executeUpdate("CREATE DATABASE demo_ds_2"); - } - Stream.of("demo_ds_0", "demo_ds_1", "demo_ds_2").parallel().forEach(this::initTable); HikariConfig config = new HikariConfig(); config.setDriverClassName("org.apache.shardingsphere.driver.ShardingSphereDriver"); - config.setJdbcUrl("jdbc:shardingsphere:classpath:test-native/yaml/jdbc/databases/clickhouse.yaml?placeholder-type=system_props"); - System.setProperty(systemPropKeyPrefix + "ds0.jdbc-url", jdbcUrlPrefix + "demo_ds_0"); - System.setProperty(systemPropKeyPrefix + "ds1.jdbc-url", jdbcUrlPrefix + "demo_ds_1"); - System.setProperty(systemPropKeyPrefix + "ds2.jdbc-url", jdbcUrlPrefix + "demo_ds_2"); - return new HikariDataSource(config); - } - - /** - * ClickHouse does not support `AUTO_INCREMENT`, - * refer to ClickHouse/ClickHouse#56228 . - * TODO The {@code shardingsphere-parser-sql-clickhouse} module needs to be fixed to use SQL like `create table`, - * `truncate table` and `drop table`. - * - * @param databaseName database name - * @throws RuntimeException SQL exception - */ - private void initTable(final String databaseName) { - try ( - Connection connection = openConnection(databaseName); - Statement statement = connection.createStatement()) { - statement.execute("create table IF NOT EXISTS t_order\n" - + "(\n" - + " order_id Int64 NOT NULL,\n" - + " order_type Int32,\n" - + " user_id Int32 NOT NULL,\n" - + " address_id Int64 NOT NULL,\n" - + " status VARCHAR(50)\n" - + ") engine = MergeTree\n" - + " primary key (order_id)\n" - + " order by (order_id)"); - statement.execute("create table IF NOT EXISTS t_order_item\n" - + "(\n" - + " order_item_id Int64 NOT NULL,\n" - + " order_id Int64 NOT NULL,\n" - + " user_id Int32 NOT NULL,\n" - + " phone VARCHAR(50),\n" - + " status VARCHAR(50)\n" - + ") engine = MergeTree\n" - + " primary key (order_item_id)\n" - + " order by (order_item_id)"); - statement.execute("CREATE TABLE IF NOT EXISTS t_address\n" - + "(\n" - + " address_id BIGINT NOT NULL,\n" - + " address_name VARCHAR(100) NOT NULL,\n" - + " PRIMARY KEY (address_id)\n" - + ")"); - statement.execute("TRUNCATE TABLE t_order"); - statement.execute("TRUNCATE TABLE t_order_item"); - statement.execute("TRUNCATE TABLE t_address"); - } catch (final SQLException exception) { - throw new RuntimeException(exception); - } + config.setJdbcUrl("jdbc:shardingsphere:classpath:test-native/yaml/jdbc/databases/clickhouse.yaml"); + logicDataSource = new HikariDataSource(config); + TestShardingService testShardingService = new TestShardingService(logicDataSource); + testShardingService.processSuccessInClickHouse(); } } diff --git a/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.database.core.type.DatabaseType b/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.database.core.type.DatabaseType index 684b775f5ce20..6c22de3937a98 100644 --- a/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.database.core.type.DatabaseType +++ b/test/native/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.database.core.type.DatabaseType @@ -17,3 +17,4 @@ org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.TcPostgreSQLDatabaseType org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.TcSQLServerDatabaseType +org.apache.shardingsphere.test.natived.commons.algorithm.testcontainers.TcClickhouseDatabaseType diff --git a/test/native/src/test/resources/test-native/sql/clickhouse-init.sql b/test/native/src/test/resources/test-native/sql/clickhouse-init.sql new file mode 100644 index 0000000000000..ef3ac48c12e61 --- /dev/null +++ b/test/native/src/test/resources/test-native/sql/clickhouse-init.sql @@ -0,0 +1,45 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- ClickHouse does not support `AUTO_INCREMENT`, refer to https://github.com/ClickHouse/ClickHouse/issues/56228 . +-- TODO The `shardingsphere-parser-sql-clickhouse` module needs to be fixed to use SQL like `create table`, `truncate table` and `drop table`. +create table IF NOT EXISTS t_order ( + order_id Int64 NOT NULL, + order_type Int32, + user_id Int32 NOT NULL, + address_id Int64 NOT NULL, + status VARCHAR(50) +) engine = MergeTree + primary key (order_id) + order by (order_id); +create table IF NOT EXISTS t_order_item ( + order_item_id Int64 NOT NULL, + order_id Int64 NOT NULL, + user_id Int32 NOT NULL, + phone VARCHAR(50), + status VARCHAR(50) +) engine = MergeTree + primary key (order_item_id) + order by (order_item_id); +CREATE TABLE IF NOT EXISTS t_address ( + address_id BIGINT NOT NULL, + address_name VARCHAR(100) NOT NULL, + PRIMARY KEY (address_id) +); +TRUNCATE TABLE t_order; +TRUNCATE TABLE t_order_item; +TRUNCATE TABLE t_address; diff --git a/test/native/src/test/resources/test-native/yaml/jdbc/databases/clickhouse.yaml b/test/native/src/test/resources/test-native/yaml/jdbc/databases/clickhouse.yaml index 037cebf0f5c0b..5f9d6f3c6bb99 100644 --- a/test/native/src/test/resources/test-native/yaml/jdbc/databases/clickhouse.yaml +++ b/test/native/src/test/resources/test-native/yaml/jdbc/databases/clickhouse.yaml @@ -18,22 +18,16 @@ dataSources: ds_0: dataSourceClassName: com.zaxxer.hikari.HikariDataSource - driverClassName: com.clickhouse.jdbc.ClickHouseDriver - jdbcUrl: $${fixture.test-native.yaml.database.clickhouse.ds0.jdbc-url::} - username: default - password: + driverClassName: org.testcontainers.jdbc.ContainerDatabaseDriver + jdbcUrl: jdbc:tc:clickhouse:25.4.5.24:///demo_ds_0?TC_INITSCRIPT=test-native/sql/clickhouse-init.sql ds_1: dataSourceClassName: com.zaxxer.hikari.HikariDataSource - driverClassName: com.clickhouse.jdbc.ClickHouseDriver - jdbcUrl: $${fixture.test-native.yaml.database.clickhouse.ds1.jdbc-url::} - username: default - password: + driverClassName: org.testcontainers.jdbc.ContainerDatabaseDriver + jdbcUrl: jdbc:tc:clickhouse:25.4.5.24:///demo_ds_1?TC_INITSCRIPT=test-native/sql/clickhouse-init.sql ds_2: dataSourceClassName: com.zaxxer.hikari.HikariDataSource - driverClassName: com.clickhouse.jdbc.ClickHouseDriver - jdbcUrl: $${fixture.test-native.yaml.database.clickhouse.ds2.jdbc-url::} - username: default - password: + driverClassName: org.testcontainers.jdbc.ContainerDatabaseDriver + jdbcUrl: jdbc:tc:clickhouse:25.4.5.24:///demo_ds_2?TC_INITSCRIPT=test-native/sql/clickhouse-init.sql rules: - !SHARDING