This is an automated email from the ASF dual-hosted git repository.
sunnianjun 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 32b58125324 Move AuditSQLException (#30773)
32b58125324 is described below
commit 32b58125324018cb7985c2546f56b0f93cac6e73
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Apr 4 20:50:31 2024 +0800
Move AuditSQLException (#30773)
* Remove useless DistSQLException
* Move AuditSQLException
---
.../algorithm/audit/DMLShardingConditionsShardingAuditAlgorithm.java | 2 +-
.../audit/DMLShardingConditionsShardingAuditAlgorithmTest.java | 2 +-
.../apache/shardingsphere/sharding/auditor/ShardingSQLAuditorTest.java | 2 +-
.../infra/exception/syntax/audit}/AuditSQLException.java | 3 ++-
.../infra/exception/syntax/audit}/SQLAuditException.java | 3 +--
.../syntax/audit}/SQLHintDataSourceNotExistsException.java | 3 +--
.../infra/route/engine/impl/PartialSQLRouteExecutor.java | 2 +-
.../infra/route/engine/impl/PartialSQLRouteExecutorTest.java | 2 +-
.../shardingsphere/proxy/frontend/netty/CDCChannelInboundHandler.java | 2 +-
9 files changed, 10 insertions(+), 11 deletions(-)
diff --git
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/audit/DMLShardingConditionsShardingAuditAlgorithm.java
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/audit/DMLShardingConditionsShardingAuditAlgorithm.java
index d4fcd63b775..17406a6f6d3 100644
---
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/audit/DMLShardingConditionsShardingAuditAlgorithm.java
+++
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/audit/DMLShardingConditionsShardingAuditAlgorithm.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.sharding.algorithm.audit;
import
org.apache.shardingsphere.infra.binder.context.statement.SQLStatementContext;
-import
org.apache.shardingsphere.infra.executor.audit.exception.SQLAuditException;
+import
org.apache.shardingsphere.infra.exception.syntax.audit.SQLAuditException;
import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.rule.RuleMetaData;
import org.apache.shardingsphere.infra.metadata.user.Grantee;
diff --git
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/audit/DMLShardingConditionsShardingAuditAlgorithmTest.java
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/audit/DMLShardingConditionsShardingAuditAlgorithmTest.java
index cb6f49de147..4f18df4f7aa 100644
---
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/audit/DMLShardingConditionsShardingAuditAlgorithmTest.java
+++
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/audit/DMLShardingConditionsShardingAuditAlgorithmTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.sharding.algorithm.audit;
import
org.apache.shardingsphere.infra.binder.context.statement.SQLStatementContext;
-import
org.apache.shardingsphere.infra.executor.audit.exception.SQLAuditException;
+import
org.apache.shardingsphere.infra.exception.syntax.audit.SQLAuditException;
import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.rule.RuleMetaData;
import org.apache.shardingsphere.infra.metadata.user.Grantee;
diff --git
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/auditor/ShardingSQLAuditorTest.java
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/auditor/ShardingSQLAuditorTest.java
index 8ac0781cc6f..ae50b0abc7a 100644
---
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/auditor/ShardingSQLAuditorTest.java
+++
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/auditor/ShardingSQLAuditorTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.sharding.auditor;
import
org.apache.shardingsphere.infra.binder.context.statement.CommonSQLStatementContext;
-import
org.apache.shardingsphere.infra.executor.audit.exception.SQLAuditException;
+import
org.apache.shardingsphere.infra.exception.syntax.audit.SQLAuditException;
import org.apache.shardingsphere.infra.hint.HintValueContext;
import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import org.apache.shardingsphere.infra.metadata.database.rule.RuleMetaData;
diff --git
a/infra/exception/core/src/main/java/org/apache/shardingsphere/infra/exception/core/external/sql/type/kernel/category/AuditSQLException.java
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/audit/AuditSQLException.java
similarity index 90%
rename from
infra/exception/core/src/main/java/org/apache/shardingsphere/infra/exception/core/external/sql/type/kernel/category/AuditSQLException.java
rename to
infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/audit/AuditSQLException.java
index a1e2e83d7a2..3c733fd2c75 100644
---
a/infra/exception/core/src/main/java/org/apache/shardingsphere/infra/exception/core/external/sql/type/kernel/category/AuditSQLException.java
+++
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/audit/AuditSQLException.java
@@ -15,10 +15,11 @@
* limitations under the License.
*/
-package
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category;
+package org.apache.shardingsphere.infra.exception.syntax.audit;
import com.google.common.base.Preconditions;
import
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.SQLState;
+import
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.SyntaxSQLException;
/**
* Audit SQL exception.
diff --git
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/audit/exception/SQLAuditException.java
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/audit/SQLAuditException.java
similarity index 87%
rename from
infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/audit/exception/SQLAuditException.java
rename to
infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/audit/SQLAuditException.java
index f95bbd50ecf..0e0e2988b8d 100644
---
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/audit/exception/SQLAuditException.java
+++
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/audit/SQLAuditException.java
@@ -15,10 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.executor.audit.exception;
+package org.apache.shardingsphere.infra.exception.syntax.audit;
import
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
-import
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.AuditSQLException;
/**
* SQL audit exception.
diff --git
a/infra/common/src/main/java/org/apache/shardingsphere/infra/hint/SQLHintDataSourceNotExistsException.java
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/audit/SQLHintDataSourceNotExistsException.java
similarity index 89%
rename from
infra/common/src/main/java/org/apache/shardingsphere/infra/hint/SQLHintDataSourceNotExistsException.java
rename to
infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/audit/SQLHintDataSourceNotExistsException.java
index 3298f346e6a..58ecaa231b9 100644
---
a/infra/common/src/main/java/org/apache/shardingsphere/infra/hint/SQLHintDataSourceNotExistsException.java
+++
b/infra/common/src/main/java/org/apache/shardingsphere/infra/exception/syntax/audit/SQLHintDataSourceNotExistsException.java
@@ -15,10 +15,9 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.infra.hint;
+package org.apache.shardingsphere.infra.exception.syntax.audit;
import
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
-import
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.AuditSQLException;
/**
* SQL Hint data source not exists exception.
diff --git
a/infra/route/src/main/java/org/apache/shardingsphere/infra/route/engine/impl/PartialSQLRouteExecutor.java
b/infra/route/src/main/java/org/apache/shardingsphere/infra/route/engine/impl/PartialSQLRouteExecutor.java
index 38bccbf45b7..748d5eee699 100644
---
a/infra/route/src/main/java/org/apache/shardingsphere/infra/route/engine/impl/PartialSQLRouteExecutor.java
+++
b/infra/route/src/main/java/org/apache/shardingsphere/infra/route/engine/impl/PartialSQLRouteExecutor.java
@@ -21,7 +21,7 @@ import
org.apache.shardingsphere.infra.annotation.HighFrequencyInvocation;
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.hint.HintManager;
import org.apache.shardingsphere.infra.hint.HintValueContext;
-import
org.apache.shardingsphere.infra.hint.SQLHintDataSourceNotExistsException;
+import
org.apache.shardingsphere.infra.exception.syntax.audit.SQLHintDataSourceNotExistsException;
import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import
org.apache.shardingsphere.infra.metadata.database.resource.unit.StorageUnit;
import org.apache.shardingsphere.infra.metadata.database.rule.RuleMetaData;
diff --git
a/infra/route/src/test/java/org/apache/shardingsphere/infra/route/engine/impl/PartialSQLRouteExecutorTest.java
b/infra/route/src/test/java/org/apache/shardingsphere/infra/route/engine/impl/PartialSQLRouteExecutorTest.java
index df4dfb3dbdf..2f8d86ddb78 100644
---
a/infra/route/src/test/java/org/apache/shardingsphere/infra/route/engine/impl/PartialSQLRouteExecutorTest.java
+++
b/infra/route/src/test/java/org/apache/shardingsphere/infra/route/engine/impl/PartialSQLRouteExecutorTest.java
@@ -21,7 +21,7 @@ import
org.apache.shardingsphere.infra.binder.context.statement.CommonSQLStateme
import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
import org.apache.shardingsphere.infra.hint.HintManager;
import org.apache.shardingsphere.infra.hint.HintValueContext;
-import
org.apache.shardingsphere.infra.hint.SQLHintDataSourceNotExistsException;
+import
org.apache.shardingsphere.infra.exception.syntax.audit.SQLHintDataSourceNotExistsException;
import
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
import
org.apache.shardingsphere.infra.metadata.database.resource.unit.StorageUnit;
import org.apache.shardingsphere.infra.metadata.database.rule.RuleMetaData;
diff --git
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/netty/CDCChannelInboundHandler.java
b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/netty/CDCChannelInboundHandler.java
index 08dc8e03ef5..cf0b8fecc58 100644
---
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/netty/CDCChannelInboundHandler.java
+++
b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/netty/CDCChannelInboundHandler.java
@@ -48,7 +48,7 @@ import
org.apache.shardingsphere.infra.exception.core.ShardingSpherePrecondition
import
org.apache.shardingsphere.infra.exception.core.external.sql.ShardingSphereSQLException;
import
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
import
org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.category.PipelineSQLException;
-import
org.apache.shardingsphere.infra.executor.audit.exception.SQLAuditException;
+import
org.apache.shardingsphere.infra.exception.syntax.audit.SQLAuditException;
import org.apache.shardingsphere.infra.metadata.user.Grantee;
import org.apache.shardingsphere.infra.metadata.user.ShardingSphereUser;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;