This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 7b1647f7ec7 Add feature-sharding profile (#36041)
7b1647f7ec7 is described below
commit 7b1647f7ec7ac02e25d89b01a375737e24fc3495
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Jul 20 19:21:21 2025 +0800
Add feature-sharding profile (#36041)
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
* Add feature-sharding profile
---
distribution/jdbc/pom.xml | 44 ++++++++++++++-
distribution/proxy-native/pom.xml | 59 ++++++++++++++++++++
distribution/proxy/pom.xml | 60 ++++++++++++++++++++
.../sql/dml/ShardingTableSupportedChecker.java | 5 +-
...SQLUnsupportedShardingSQLStatementProvider.java | 44 ---------------
features/sharding/dialect/pom.xml | 1 -
features/sharding/dialect/postgresql/pom.xml | 41 --------------
...SQLUnsupportedShardingSQLStatementProvider.java | 43 --------------
....DialectUnsupportedShardingSQLStatementProvider | 18 ------
jdbc-dialect/doris/pom.xml | 7 ---
jdbc-dialect/mariadb/pom.xml | 7 ---
jdbc-dialect/mysql/pom.xml | 7 ---
jdbc-dialect/postgresql/pom.xml | 7 ---
jdbc/pom.xml | 11 ++--
.../ShardingSpherePipelineDataSourceCreator.java | 44 +++++----------
.../yaml/PipelineYamlRuleConfigurationReviser.java | 39 +++++++++++++
...ardingPipelineYamlRuleConfigurationReviser.java | 65 ++++++++++++++++++++++
...ource.yaml.PipelineYamlRuleConfigurationReviser | 2 +-
kernel/data-pipeline/scenario/cdc/core/pom.xml | 7 ---
kernel/data-pipeline/scenario/migration/pom.xml | 7 ---
...UnsupportedDistributeSQLStatementAttribute.java | 26 +++++++++
.../mysql/dml/MySQLLoadDataStatement.java | 3 +-
.../statement/mysql/dml/MySQLLoadXMLStatement.java | 3 +-
.../postgresql/dml/PostgreSQLCopyStatement.java | 4 +-
proxy/backend/core/pom.xml | 17 ++++--
proxy/bootstrap/pom.xml | 12 ++++
proxy/dialect/doris/pom.xml | 7 ---
proxy/dialect/mariadb/pom.xml | 7 ---
proxy/dialect/mysql/pom.xml | 7 ---
proxy/dialect/postgresql/pom.xml | 7 ---
.../command/query/PostgreSQLCommandTest.java | 2 -
test/e2e/agent/fixture/jdbc-fixture/pom.xml | 6 ++
test/e2e/driver/pom.xml | 1 -
test/e2e/fixture/pom.xml | 12 ++++
test/e2e/operation/pipeline/pom.xml | 12 ++++
test/it/pipeline/pom.xml | 5 ++
test/it/rewriter/pom.xml | 2 +-
test/native/pom.xml | 6 ++
38 files changed, 389 insertions(+), 268 deletions(-)
diff --git a/distribution/jdbc/pom.xml b/distribution/jdbc/pom.xml
index 15c8793753c..258c2a82744 100644
--- a/distribution/jdbc/pom.xml
+++ b/distribution/jdbc/pom.xml
@@ -165,11 +165,24 @@
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-core</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-broadcast-core</artifactId>
<version>${project.version}</version>
- <scope>test</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
@@ -365,6 +378,35 @@
</dependencies>
</profile>
+ <profile>
+ <id>feature-sharding</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-core</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>feature-sharding-mysql</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-core</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
<profile>
<id>feature-broadcast</id>
<dependencies>
diff --git a/distribution/proxy-native/pom.xml
b/distribution/proxy-native/pom.xml
index 011a257995d..8eb69fbb462 100644
--- a/distribution/proxy-native/pom.xml
+++ b/distribution/proxy-native/pom.xml
@@ -251,6 +251,25 @@
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-sharding-distsql-handler</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-data-pipeline-feature-sharding</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-broadcast-distsql-handler</artifactId>
@@ -509,6 +528,46 @@
</dependencies>
</profile>
+ <profile>
+ <id>feature-sharding</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-sharding-distsql-handler</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-data-pipeline-feature-sharding</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>feature-sharding-mysql</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-sharding-distsql-handler</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-data-pipeline-feature-sharding</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
<profile>
<id>feature-broadcast</id>
<dependencies>
diff --git a/distribution/proxy/pom.xml b/distribution/proxy/pom.xml
index 49c54293dc6..861f4019cbd 100644
--- a/distribution/proxy/pom.xml
+++ b/distribution/proxy/pom.xml
@@ -289,6 +289,25 @@
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-sharding-distsql-handler</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-data-pipeline-feature-sharding</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-broadcast-distsql-handler</artifactId>
@@ -547,6 +566,47 @@
</dependencies>
</profile>
+ <profile>
+ <id>feature-sharding</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-sharding-distsql-handler</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-data-pipeline-feature-sharding</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>feature-sharding-mysql</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-sharding-distsql-handler</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-data-pipeline-feature-sharding</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
<profile>
<id>feature-broadcast</id>
<dependencies>
diff --git
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/checker/sql/dml/ShardingTableSupportedChecker.java
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/checker/sql/dml/ShardingTableSupportedChecker.java
index 8ddcb4aa8f6..24d2660fece 100644
---
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/checker/sql/dml/ShardingTableSupportedChecker.java
+++
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/checker/sql/dml/ShardingTableSupportedChecker.java
@@ -20,7 +20,6 @@ package org.apache.shardingsphere.sharding.checker.sql.dml;
import org.apache.shardingsphere.infra.annotation.HighFrequencyInvocation;
import
org.apache.shardingsphere.infra.binder.context.statement.SQLStatementContext;
import org.apache.shardingsphere.infra.checker.SupportedSQLChecker;
-import
org.apache.shardingsphere.infra.database.core.spi.DatabaseTypedSPILoader;
import
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
@@ -28,6 +27,7 @@ import
org.apache.shardingsphere.sharding.exception.syntax.UnsupportedShardingOp
import org.apache.shardingsphere.sharding.rule.ShardingRule;
import
org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SimpleTableSegment;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.TableSQLStatementAttribute;
+import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.UnsupportedDistributeSQLStatementAttribute;
/**
* Table supported checker for sharding.
@@ -37,8 +37,7 @@ public final class ShardingTableSupportedChecker implements
SupportedSQLChecker<
@Override
public boolean isCheck(final SQLStatementContext sqlStatementContext) {
- return
DatabaseTypedSPILoader.findService(DialectUnsupportedShardingSQLStatementProvider.class,
sqlStatementContext.getSqlStatement().getDatabaseType())
- .map(optional ->
optional.getUnsupportedSQLStatementTypes().contains(sqlStatementContext.getSqlStatement().getClass())).orElse(false);
+ return
sqlStatementContext.getSqlStatement().getAttributes().findAttribute(UnsupportedDistributeSQLStatementAttribute.class).isPresent();
}
@Override
diff --git
a/features/sharding/dialect/mysql/src/main/java/org/apache/shardingsphere/sharding/check/mysql/MySQLUnsupportedShardingSQLStatementProvider.java
b/features/sharding/dialect/mysql/src/main/java/org/apache/shardingsphere/sharding/check/mysql/MySQLUnsupportedShardingSQLStatementProvider.java
deleted file mode 100644
index f902ff6c224..00000000000
---
a/features/sharding/dialect/mysql/src/main/java/org/apache/shardingsphere/sharding/check/mysql/MySQLUnsupportedShardingSQLStatementProvider.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.sharding.check.mysql;
-
-import
org.apache.shardingsphere.sharding.checker.sql.dml.DialectUnsupportedShardingSQLStatementProvider;
-import
org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
-import
org.apache.shardingsphere.sql.parser.statement.mysql.dml.MySQLLoadDataStatement;
-import
org.apache.shardingsphere.sql.parser.statement.mysql.dml.MySQLLoadXMLStatement;
-
-import java.util.Arrays;
-import java.util.Collection;
-
-/**
- * Unsupported sharding SQL statement provider for MySQL.
- */
-public final class MySQLUnsupportedShardingSQLStatementProvider implements
DialectUnsupportedShardingSQLStatementProvider {
-
- private static final Collection<Class<? extends SQLStatement>>
UNSUPPORTED_SQL_STATEMENT_TYPES = Arrays.asList(MySQLLoadDataStatement.class,
MySQLLoadXMLStatement.class);
-
- @Override
- public Collection<Class<? extends SQLStatement>>
getUnsupportedSQLStatementTypes() {
- return UNSUPPORTED_SQL_STATEMENT_TYPES;
- }
-
- @Override
- public String getDatabaseType() {
- return "MySQL";
- }
-}
diff --git a/features/sharding/dialect/pom.xml
b/features/sharding/dialect/pom.xml
index ed86341f245..f552e7c87aa 100644
--- a/features/sharding/dialect/pom.xml
+++ b/features/sharding/dialect/pom.xml
@@ -29,6 +29,5 @@
<modules>
<module>mysql</module>
- <module>postgresql</module>
</modules>
</project>
diff --git a/features/sharding/dialect/postgresql/pom.xml
b/features/sharding/dialect/postgresql/pom.xml
deleted file mode 100644
index 27ef514f748..00000000000
--- a/features/sharding/dialect/postgresql/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-dialect</artifactId>
- <version>5.5.3-SNAPSHOT</version>
- </parent>
- <artifactId>shardingsphere-sharding-postgresql</artifactId>
- <name>${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
-
<artifactId>shardingsphere-parser-sql-statement-postgresql</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project>
diff --git
a/features/sharding/dialect/postgresql/src/main/java/org/apache/shardingsphere/sharding/check/postgresql/PostgreSQLUnsupportedShardingSQLStatementProvider.java
b/features/sharding/dialect/postgresql/src/main/java/org/apache/shardingsphere/sharding/check/postgresql/PostgreSQLUnsupportedShardingSQLStatementProvider.java
deleted file mode 100644
index c07312c19f5..00000000000
---
a/features/sharding/dialect/postgresql/src/main/java/org/apache/shardingsphere/sharding/check/postgresql/PostgreSQLUnsupportedShardingSQLStatementProvider.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.sharding.check.postgresql;
-
-import
org.apache.shardingsphere.sharding.checker.sql.dml.DialectUnsupportedShardingSQLStatementProvider;
-import
org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
-import
org.apache.shardingsphere.sql.parser.statement.postgresql.dml.PostgreSQLCopyStatement;
-
-import java.util.Collection;
-import java.util.Collections;
-
-/**
- * Unsupported sharding SQL statement provider for PostgreSQL.
- */
-public final class PostgreSQLUnsupportedShardingSQLStatementProvider
implements DialectUnsupportedShardingSQLStatementProvider {
-
- private static final Collection<Class<? extends SQLStatement>>
UNSUPPORTED_SQL_STATEMENT_TYPES =
Collections.singleton(PostgreSQLCopyStatement.class);
-
- @Override
- public Collection<Class<? extends SQLStatement>>
getUnsupportedSQLStatementTypes() {
- return UNSUPPORTED_SQL_STATEMENT_TYPES;
- }
-
- @Override
- public String getDatabaseType() {
- return "PostgreSQL";
- }
-}
diff --git
a/features/sharding/dialect/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.sharding.checker.sql.dml.DialectUnsupportedShardingSQLStatementProvider
b/features/sharding/dialect/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.sharding.checker.sql.dml.DialectUnsupportedShardingSQLStatementProvider
deleted file mode 100644
index c1effc99cfd..00000000000
---
a/features/sharding/dialect/postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.sharding.checker.sql.dml.DialectUnsupportedShardingSQLStatementProvider
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# 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.
-#
-
-org.apache.shardingsphere.sharding.check.postgresql.PostgreSQLUnsupportedShardingSQLStatementProvider
diff --git a/jdbc-dialect/doris/pom.xml b/jdbc-dialect/doris/pom.xml
index e1ab3589c40..ca1b678dc60 100644
--- a/jdbc-dialect/doris/pom.xml
+++ b/jdbc-dialect/doris/pom.xml
@@ -51,12 +51,5 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
-
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-mysql</artifactId>
- <version>${project.version}</version>
- <scope>runtime</scope>
- </dependency>
</dependencies>
</project>
diff --git a/jdbc-dialect/mariadb/pom.xml b/jdbc-dialect/mariadb/pom.xml
index 07c351b9f47..5d48e8b5fe3 100644
--- a/jdbc-dialect/mariadb/pom.xml
+++ b/jdbc-dialect/mariadb/pom.xml
@@ -57,12 +57,5 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
-
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-mysql</artifactId>
- <version>${project.version}</version>
- <scope>runtime</scope>
- </dependency>
</dependencies>
</project>
diff --git a/jdbc-dialect/mysql/pom.xml b/jdbc-dialect/mysql/pom.xml
index e663ff508ed..fd95f9468e0 100644
--- a/jdbc-dialect/mysql/pom.xml
+++ b/jdbc-dialect/mysql/pom.xml
@@ -51,12 +51,5 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
-
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-mysql</artifactId>
- <version>${project.version}</version>
- <scope>runtime</scope>
- </dependency>
</dependencies>
</project>
diff --git a/jdbc-dialect/postgresql/pom.xml b/jdbc-dialect/postgresql/pom.xml
index 9423eb643f7..5816dd6c897 100644
--- a/jdbc-dialect/postgresql/pom.xml
+++ b/jdbc-dialect/postgresql/pom.xml
@@ -45,12 +45,5 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
-
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-postgresql</artifactId>
- <version>${project.version}</version>
- <scope>runtime</scope>
- </dependency>
</dependencies>
</project>
diff --git a/jdbc/pom.xml b/jdbc/pom.xml
index 0bf97831e31..eafa854b173 100644
--- a/jdbc/pom.xml
+++ b/jdbc/pom.xml
@@ -73,11 +73,6 @@
<artifactId>shardingsphere-infra-context</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-core</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-sql-federation-core</artifactId>
@@ -129,6 +124,12 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-core</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
diff --git
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/datasource/creator/ShardingSpherePipelineDataSourceCreator.java
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/datasource/creator/ShardingSpherePipelineDataSourceCreator.java
index 62c31593afb..100d5489d5f 100644
---
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/datasource/creator/ShardingSpherePipelineDataSourceCreator.java
+++
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/datasource/creator/ShardingSpherePipelineDataSourceCreator.java
@@ -19,29 +19,31 @@ package
org.apache.shardingsphere.data.pipeline.core.datasource.creator;
import
org.apache.shardingsphere.authority.yaml.config.YamlAuthorityRuleConfiguration;
import
org.apache.shardingsphere.data.pipeline.api.type.ShardingSpherePipelineDataSourceConfiguration;
+import
org.apache.shardingsphere.data.pipeline.core.datasource.yaml.PipelineYamlRuleConfigurationReviser;
import org.apache.shardingsphere.data.pipeline.spi.PipelineDataSourceCreator;
import org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory;
-import
org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration;
import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey;
import
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationPropertyKey;
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
import
org.apache.shardingsphere.infra.datasource.pool.destroyer.DataSourcePoolDestroyer;
+import org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPILoader;
import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
import org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration;
import
org.apache.shardingsphere.infra.yaml.config.pojo.mode.YamlModeConfiguration;
import
org.apache.shardingsphere.infra.yaml.config.pojo.mode.YamlPersistRepositoryConfiguration;
+import
org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration;
import
org.apache.shardingsphere.infra.yaml.config.swapper.mode.YamlModeConfigurationSwapper;
import
org.apache.shardingsphere.infra.yaml.config.swapper.resource.YamlDataSourceConfigurationSwapper;
import
org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlRuleConfigurationSwapperEngine;
-import
org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration;
import javax.sql.DataSource;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.Collection;
+import java.util.HashMap;
import java.util.Map;
-import java.util.Optional;
+import java.util.Map.Entry;
import java.util.Properties;
/**
@@ -54,7 +56,7 @@ public final class ShardingSpherePipelineDataSourceCreator
implements PipelineDa
YamlRootConfiguration yamlRootConfig =
YamlEngine.unmarshal(YamlEngine.marshal(dataSourceConfig),
YamlRootConfiguration.class);
removeAuthorityRuleConfiguration(yamlRootConfig);
updateConfigurationProperties(yamlRootConfig);
- updateShardingRuleConfiguration(yamlRootConfig);
+ reviseYamlRuleConfiguration(yamlRootConfig);
yamlRootConfig.setMode(createStandaloneModeConfiguration());
return createShardingSphereDataSource(yamlRootConfig);
}
@@ -77,32 +79,16 @@ public final class ShardingSpherePipelineDataSourceCreator
implements PipelineDa
yamlRootConfig.setProps(newProps);
}
- private void updateShardingRuleConfiguration(final YamlRootConfiguration
yamlRootConfig) {
- Optional<YamlShardingRuleConfiguration> yamlShardingRuleConfig =
yamlRootConfig.getRules().stream()
-
.filter(YamlShardingRuleConfiguration.class::isInstance).findFirst().map(YamlShardingRuleConfiguration.class::cast);
- if (yamlShardingRuleConfig.isPresent()) {
- enableRangeQueryForInline(yamlShardingRuleConfig.get());
- removeAuditStrategy(yamlShardingRuleConfig.get());
- }
- }
-
- private void enableRangeQueryForInline(final YamlShardingRuleConfiguration
yamlShardingRuleConfig) {
- for (YamlAlgorithmConfiguration each :
yamlShardingRuleConfig.getShardingAlgorithms().values()) {
- if ("INLINE".equalsIgnoreCase(each.getType())) {
- each.getProps().put("allow-range-query-with-inline-sharding",
Boolean.TRUE.toString());
- }
- }
- }
-
- private void removeAuditStrategy(final YamlShardingRuleConfiguration
yamlShardingRuleConfig) {
- yamlShardingRuleConfig.setDefaultAuditStrategy(null);
- yamlShardingRuleConfig.setAuditors(null);
- if (null != yamlShardingRuleConfig.getTables()) {
- yamlShardingRuleConfig.getTables().forEach((key, value) ->
value.setAuditStrategy(null));
- }
- if (null != yamlShardingRuleConfig.getAutoTables()) {
- yamlShardingRuleConfig.getAutoTables().forEach((key, value) ->
value.setAuditStrategy(null));
+ @SuppressWarnings({"rawtypes", "unchecked"})
+ private void reviseYamlRuleConfiguration(final YamlRootConfiguration
yamlRootConfig) {
+ Map<Class<?>, YamlRuleConfiguration> revisedYamlRuleConfigs = new
HashMap<>(yamlRootConfig.getRules().size(), 1F);
+ for (Entry<YamlRuleConfiguration,
PipelineYamlRuleConfigurationReviser> entry :
OrderedSPILoader.getServices(PipelineYamlRuleConfigurationReviser.class,
yamlRootConfig.getRules())
+ .entrySet()) {
+ YamlRuleConfiguration revisedYamlRuleConfig =
entry.getValue().revise(entry.getKey());
+ revisedYamlRuleConfigs.put(revisedYamlRuleConfig.getClass(),
revisedYamlRuleConfig);
}
+ yamlRootConfig.getRules().removeIf(each ->
revisedYamlRuleConfigs.containsKey(each.getClass()));
+ yamlRootConfig.getRules().addAll(revisedYamlRuleConfigs.values());
}
private YamlModeConfiguration createStandaloneModeConfiguration() {
diff --git
a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/datasource/yaml/PipelineYamlRuleConfigurationReviser.java
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/datasource/yaml/PipelineYamlRuleConfigurationReviser.java
new file mode 100644
index 00000000000..b5992b8f76e
--- /dev/null
+++
b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/datasource/yaml/PipelineYamlRuleConfigurationReviser.java
@@ -0,0 +1,39 @@
+/*
+ * 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.data.pipeline.core.datasource.yaml;
+
+import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
+import org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPI;
+import
org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration;
+
+/**
+ * Pipeline YAML rule configuration reviser.
+ *
+ * @param <T> type of YAML rule configuration
+ */
+@SingletonSPI
+public interface PipelineYamlRuleConfigurationReviser<T extends
YamlRuleConfiguration> extends OrderedSPI<T> {
+
+ /**
+ * Revise YAML rule configuration.
+ *
+ * @param yamlRuleConfig to be revised YAML rule configuration
+ * @return revised YAML rule configuration
+ */
+ T revise(T yamlRuleConfig);
+}
diff --git
a/kernel/data-pipeline/feature/sharding/src/main/java/org/apache/shardingsphere/data/pipeline/sharding/ShardingPipelineYamlRuleConfigurationReviser.java
b/kernel/data-pipeline/feature/sharding/src/main/java/org/apache/shardingsphere/data/pipeline/sharding/ShardingPipelineYamlRuleConfigurationReviser.java
new file mode 100644
index 00000000000..4ce5eae2996
--- /dev/null
+++
b/kernel/data-pipeline/feature/sharding/src/main/java/org/apache/shardingsphere/data/pipeline/sharding/ShardingPipelineYamlRuleConfigurationReviser.java
@@ -0,0 +1,65 @@
+/*
+ * 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.data.pipeline.sharding;
+
+import
org.apache.shardingsphere.data.pipeline.core.datasource.yaml.PipelineYamlRuleConfigurationReviser;
+import
org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration;
+import org.apache.shardingsphere.sharding.constant.ShardingOrder;
+import
org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration;
+
+/**
+ * Sharding pipeline YAML rule configuration reviser.
+ */
+public final class ShardingPipelineYamlRuleConfigurationReviser implements
PipelineYamlRuleConfigurationReviser<YamlShardingRuleConfiguration> {
+
+ @Override
+ public YamlShardingRuleConfiguration revise(final
YamlShardingRuleConfiguration yamlRuleConfig) {
+ enableRangeQueryForInline(yamlRuleConfig);
+ removeAuditStrategy(yamlRuleConfig);
+ return yamlRuleConfig;
+ }
+
+ private void enableRangeQueryForInline(final YamlShardingRuleConfiguration
yamlRuleConfig) {
+ for (YamlAlgorithmConfiguration each :
yamlRuleConfig.getShardingAlgorithms().values()) {
+ if ("INLINE".equalsIgnoreCase(each.getType())) {
+ each.getProps().put("allow-range-query-with-inline-sharding",
Boolean.TRUE.toString());
+ }
+ }
+ }
+
+ private void removeAuditStrategy(final YamlShardingRuleConfiguration
yamlRuleConfig) {
+ yamlRuleConfig.setDefaultAuditStrategy(null);
+ yamlRuleConfig.setAuditors(null);
+ if (null != yamlRuleConfig.getTables()) {
+ yamlRuleConfig.getTables().forEach((key, value) ->
value.setAuditStrategy(null));
+ }
+ if (null != yamlRuleConfig.getAutoTables()) {
+ yamlRuleConfig.getAutoTables().forEach((key, value) ->
value.setAuditStrategy(null));
+ }
+ }
+
+ @Override
+ public int getOrder() {
+ return ShardingOrder.ORDER;
+ }
+
+ @Override
+ public Class<YamlShardingRuleConfiguration> getTypeClass() {
+ return YamlShardingRuleConfiguration.class;
+ }
+}
diff --git
a/features/sharding/dialect/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.sharding.checker.sql.dml.DialectUnsupportedShardingSQLStatementProvider
b/kernel/data-pipeline/feature/sharding/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.datasource.yaml.PipelineYamlRuleConfigurationReviser
similarity index 89%
rename from
features/sharding/dialect/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.sharding.checker.sql.dml.DialectUnsupportedShardingSQLStatementProvider
rename to
kernel/data-pipeline/feature/sharding/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.datasource.yaml.PipelineYamlRuleConfigurationReviser
index f90e0f0608f..a6fdb924cb6 100644
---
a/features/sharding/dialect/mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.sharding.checker.sql.dml.DialectUnsupportedShardingSQLStatementProvider
+++
b/kernel/data-pipeline/feature/sharding/src/main/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.core.datasource.yaml.PipelineYamlRuleConfigurationReviser
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.sharding.check.mysql.MySQLUnsupportedShardingSQLStatementProvider
+org.apache.shardingsphere.data.pipeline.sharding.ShardingPipelineYamlRuleConfigurationReviser
diff --git a/kernel/data-pipeline/scenario/cdc/core/pom.xml
b/kernel/data-pipeline/scenario/cdc/core/pom.xml
index e69b6f9c250..87b46598612 100644
--- a/kernel/data-pipeline/scenario/cdc/core/pom.xml
+++ b/kernel/data-pipeline/scenario/cdc/core/pom.xml
@@ -38,13 +38,6 @@
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
-
<artifactId>shardingsphere-data-pipeline-feature-sharding</artifactId>
- <version>${project.version}</version>
- <scope>runtime</scope>
- </dependency>
-
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-test-util</artifactId>
diff --git a/kernel/data-pipeline/scenario/migration/pom.xml
b/kernel/data-pipeline/scenario/migration/pom.xml
index fd5389e4a3b..2b8a819baec 100644
--- a/kernel/data-pipeline/scenario/migration/pom.xml
+++ b/kernel/data-pipeline/scenario/migration/pom.xml
@@ -37,12 +37,5 @@
<artifactId>shardingsphere-data-pipeline-core</artifactId>
<version>${project.version}</version>
</dependency>
-
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
-
<artifactId>shardingsphere-data-pipeline-feature-sharding</artifactId>
- <version>${project.version}</version>
- <scope>runtime</scope>
- </dependency>
</dependencies>
</project>
diff --git
a/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/attribute/type/UnsupportedDistributeSQLStatementAttribute.java
b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/attribute/type/UnsupportedDistributeSQLStatementAttribute.java
new file mode 100644
index 00000000000..72529773667
--- /dev/null
+++
b/parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/statement/attribute/type/UnsupportedDistributeSQLStatementAttribute.java
@@ -0,0 +1,26 @@
+/*
+ * 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.sql.parser.statement.core.statement.attribute.type;
+
+import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.SQLStatementAttribute;
+
+/**
+ * Unsupported distribute SQL statement attribute.
+ */
+public final class UnsupportedDistributeSQLStatementAttribute implements
SQLStatementAttribute {
+}
diff --git
a/parser/sql/statement/type/mysql/src/main/java/org/apache/shardingsphere/sql/parser/statement/mysql/dml/MySQLLoadDataStatement.java
b/parser/sql/statement/type/mysql/src/main/java/org/apache/shardingsphere/sql/parser/statement/mysql/dml/MySQLLoadDataStatement.java
index 3d519d97cd5..6bb5904fbfb 100644
---
a/parser/sql/statement/type/mysql/src/main/java/org/apache/shardingsphere/sql/parser/statement/mysql/dml/MySQLLoadDataStatement.java
+++
b/parser/sql/statement/type/mysql/src/main/java/org/apache/shardingsphere/sql/parser/statement/mysql/dml/MySQLLoadDataStatement.java
@@ -22,6 +22,7 @@ import
org.apache.shardingsphere.infra.database.core.type.DatabaseType;
import
org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SimpleTableSegment;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.SQLStatementAttributes;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.TableSQLStatementAttribute;
+import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.UnsupportedDistributeSQLStatementAttribute;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dml.DMLStatement;
/**
@@ -39,6 +40,6 @@ public final class MySQLLoadDataStatement extends
DMLStatement {
@Override
public SQLStatementAttributes getAttributes() {
- return new SQLStatementAttributes(new
TableSQLStatementAttribute(table));
+ return new SQLStatementAttributes(new
TableSQLStatementAttribute(table), new
UnsupportedDistributeSQLStatementAttribute());
}
}
diff --git
a/parser/sql/statement/type/mysql/src/main/java/org/apache/shardingsphere/sql/parser/statement/mysql/dml/MySQLLoadXMLStatement.java
b/parser/sql/statement/type/mysql/src/main/java/org/apache/shardingsphere/sql/parser/statement/mysql/dml/MySQLLoadXMLStatement.java
index 8e83b7a4700..6ebbba873f5 100644
---
a/parser/sql/statement/type/mysql/src/main/java/org/apache/shardingsphere/sql/parser/statement/mysql/dml/MySQLLoadXMLStatement.java
+++
b/parser/sql/statement/type/mysql/src/main/java/org/apache/shardingsphere/sql/parser/statement/mysql/dml/MySQLLoadXMLStatement.java
@@ -22,6 +22,7 @@ import
org.apache.shardingsphere.infra.database.core.type.DatabaseType;
import
org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SimpleTableSegment;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.SQLStatementAttributes;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.TableSQLStatementAttribute;
+import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.UnsupportedDistributeSQLStatementAttribute;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dml.DMLStatement;
/**
@@ -39,6 +40,6 @@ public final class MySQLLoadXMLStatement extends DMLStatement
{
@Override
public SQLStatementAttributes getAttributes() {
- return new SQLStatementAttributes(new
TableSQLStatementAttribute(table));
+ return new SQLStatementAttributes(new
TableSQLStatementAttribute(table), new
UnsupportedDistributeSQLStatementAttribute());
}
}
diff --git
a/parser/sql/statement/type/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/statement/postgresql/dml/PostgreSQLCopyStatement.java
b/parser/sql/statement/type/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/statement/postgresql/dml/PostgreSQLCopyStatement.java
index 33865774ff3..5c1f1c158e3 100644
---
a/parser/sql/statement/type/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/statement/postgresql/dml/PostgreSQLCopyStatement.java
+++
b/parser/sql/statement/type/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/statement/postgresql/dml/PostgreSQLCopyStatement.java
@@ -24,6 +24,7 @@ import
org.apache.shardingsphere.sql.parser.statement.core.segment.dml.prepare.P
import
org.apache.shardingsphere.sql.parser.statement.core.segment.generic.table.SimpleTableSegment;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.SQLStatementAttributes;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.TableSQLStatementAttribute;
+import
org.apache.shardingsphere.sql.parser.statement.core.statement.attribute.type.UnsupportedDistributeSQLStatementAttribute;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dml.DMLStatement;
import java.util.Collection;
@@ -70,6 +71,7 @@ public final class PostgreSQLCopyStatement extends
DMLStatement {
@Override
public SQLStatementAttributes getAttributes() {
- return new SQLStatementAttributes(new TableSQLStatementAttribute(null
== table ? Collections.emptyList() : Collections.singletonList(table)));
+ return new SQLStatementAttributes(
+ new TableSQLStatementAttribute(null == table ?
Collections.emptyList() : Collections.singletonList(table)), new
UnsupportedDistributeSQLStatementAttribute());
}
}
diff --git a/proxy/backend/core/pom.xml b/proxy/backend/core/pom.xml
index e3926612ac7..166b6d6f39c 100644
--- a/proxy/backend/core/pom.xml
+++ b/proxy/backend/core/pom.xml
@@ -47,11 +47,6 @@
<artifactId>shardingsphere-cluster-mode-core</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-distsql-handler</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-authority-distsql-handler</artifactId>
@@ -175,6 +170,18 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-distsql-handler</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-broadcast-distsql-handler</artifactId>
diff --git a/proxy/bootstrap/pom.xml b/proxy/bootstrap/pom.xml
index 4068286443d..edbfb359d84 100644
--- a/proxy/bootstrap/pom.xml
+++ b/proxy/bootstrap/pom.xml
@@ -163,6 +163,18 @@
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-sharding-distsql-handler</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-broadcast-distsql-handler</artifactId>
diff --git a/proxy/dialect/doris/pom.xml b/proxy/dialect/doris/pom.xml
index f803fb31380..95de38eb63b 100644
--- a/proxy/dialect/doris/pom.xml
+++ b/proxy/dialect/doris/pom.xml
@@ -51,12 +51,5 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
-
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-mysql</artifactId>
- <version>${project.version}</version>
- <scope>runtime</scope>
- </dependency>
</dependencies>
</project>
diff --git a/proxy/dialect/mariadb/pom.xml b/proxy/dialect/mariadb/pom.xml
index 5479b7c9574..f65110aed10 100644
--- a/proxy/dialect/mariadb/pom.xml
+++ b/proxy/dialect/mariadb/pom.xml
@@ -69,12 +69,5 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
-
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-mysql</artifactId>
- <version>${project.version}</version>
- <scope>runtime</scope>
- </dependency>
</dependencies>
</project>
diff --git a/proxy/dialect/mysql/pom.xml b/proxy/dialect/mysql/pom.xml
index e7af6f2d6ca..b7bbe42db7c 100644
--- a/proxy/dialect/mysql/pom.xml
+++ b/proxy/dialect/mysql/pom.xml
@@ -69,12 +69,5 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
-
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-mysql</artifactId>
- <version>${project.version}</version>
- <scope>runtime</scope>
- </dependency>
</dependencies>
</project>
diff --git a/proxy/dialect/postgresql/pom.xml b/proxy/dialect/postgresql/pom.xml
index 917b6eff29b..2176bde309a 100644
--- a/proxy/dialect/postgresql/pom.xml
+++ b/proxy/dialect/postgresql/pom.xml
@@ -63,12 +63,5 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
-
- <dependency>
- <groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-postgresql</artifactId>
- <version>${project.version}</version>
- <scope>runtime</scope>
- </dependency>
</dependencies>
</project>
diff --git
a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/PostgreSQLCommandTest.java
b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/PostgreSQLCommandTest.java
index 06dc0e10d08..9fcdca2ac20 100644
---
a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/PostgreSQLCommandTest.java
+++
b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/PostgreSQLCommandTest.java
@@ -19,7 +19,6 @@ package
org.apache.shardingsphere.proxy.frontend.postgresql.command.query;
import org.apache.shardingsphere.distsql.statement.DistSQLStatement;
import
org.apache.shardingsphere.distsql.statement.rdl.resource.unit.type.RegisterStorageUnitStatement;
-import
org.apache.shardingsphere.sharding.distsql.statement.CreateShardingTableRuleStatement;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.AnalyzeTableStatement;
import
org.apache.shardingsphere.sql.parser.statement.core.statement.type.dal.SetStatement;
@@ -170,7 +169,6 @@ class PostgreSQLCommandTest {
@Test
void assertValueOfCreateShardingTableRuleOrCreateDataSourcesStatement() {
assertThat(PostgreSQLCommand.valueOf(RegisterStorageUnitStatement.class).orElse(null),
is(PostgreSQLCommand.SUCCESS));
-
assertThat(PostgreSQLCommand.valueOf(CreateShardingTableRuleStatement.class).orElse(null),
is(PostgreSQLCommand.SUCCESS));
assertThat(PostgreSQLCommand.valueOf(DistSQLStatement.class).orElse(null),
is(PostgreSQLCommand.SUCCESS));
assertThat(PostgreSQLCommand.SUCCESS.getTag(), is("SUCCESS"));
}
diff --git a/test/e2e/agent/fixture/jdbc-fixture/pom.xml
b/test/e2e/agent/fixture/jdbc-fixture/pom.xml
index bd43cdcc2e0..d097d6d60f9 100644
--- a/test/e2e/agent/fixture/jdbc-fixture/pom.xml
+++ b/test/e2e/agent/fixture/jdbc-fixture/pom.xml
@@ -63,6 +63,12 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>com.mysql</groupId>
diff --git a/test/e2e/driver/pom.xml b/test/e2e/driver/pom.xml
index bfe0bd6438e..7d76e4c6eba 100644
--- a/test/e2e/driver/pom.xml
+++ b/test/e2e/driver/pom.xml
@@ -82,7 +82,6 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-broadcast-core</artifactId>
diff --git a/test/e2e/fixture/pom.xml b/test/e2e/fixture/pom.xml
index 984835b5b54..7d7ee8652e3 100644
--- a/test/e2e/fixture/pom.xml
+++ b/test/e2e/fixture/pom.xml
@@ -96,6 +96,18 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-data-pipeline-feature-sharding</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-encrypt-core</artifactId>
diff --git a/test/e2e/operation/pipeline/pom.xml
b/test/e2e/operation/pipeline/pom.xml
index 4163b971c18..6762eaded49 100644
--- a/test/e2e/operation/pipeline/pom.xml
+++ b/test/e2e/operation/pipeline/pom.xml
@@ -122,6 +122,18 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+
<artifactId>shardingsphere-data-pipeline-feature-sharding</artifactId>
+ <version>${project.version}</version>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-broadcast-core</artifactId>
diff --git a/test/it/pipeline/pom.xml b/test/it/pipeline/pom.xml
index daa0efa50e1..30194939549 100644
--- a/test/it/pipeline/pom.xml
+++ b/test/it/pipeline/pom.xml
@@ -72,6 +72,11 @@
<artifactId>shardingsphere-cluster-mode-repository-zookeeper</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
diff --git a/test/it/rewriter/pom.xml b/test/it/rewriter/pom.xml
index 56b1f725ec1..0828fdc49ee 100644
--- a/test/it/rewriter/pom.xml
+++ b/test/it/rewriter/pom.xml
@@ -41,7 +41,7 @@
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
- <artifactId>shardingsphere-sharding-core</artifactId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
diff --git a/test/native/pom.xml b/test/native/pom.xml
index 02d8b10d04b..d629e71613b 100644
--- a/test/native/pom.xml
+++ b/test/native/pom.xml
@@ -100,6 +100,12 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-sharding-mysql</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-encrypt-core</artifactId>