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 95e1f814635 Reorganize exception package structure (#35377) 95e1f814635 is described below commit 95e1f8146353dfc5670804e95a594560eec1a578 Author: Liang Zhang <zhangli...@apache.org> AuthorDate: Tue May 13 00:21:58 2025 +0800 Reorganize exception package structure (#35377) - Move AccessDeniedException to dialect.exception.connection package - Move ColumnNotFoundException to dialect.exception.syntax.column package - Update related imports in multiple files --- .../exception/dialect/exception/connection}/AccessDeniedException.java | 2 +- .../dialect/exception/syntax/column}/ColumnNotFoundException.java | 2 +- .../infra/exception/mysql/mapper/MySQLDialectExceptionMapper.java | 2 +- .../infra/exception/mysql/mapper/MySQLDialectExceptionMapperTest.java | 2 +- .../exception/postgresql/mapper/PostgreSQLDialectExceptionMapper.java | 2 +- .../shardingsphere/proxy/frontend/netty/CDCChannelInboundHandler.java | 2 +- .../proxy/frontend/mysql/authentication/MySQLAuthenticationEngine.java | 2 +- .../binary/prepare/MySQLComStmtPrepareParameterMarkerExtractor.java | 2 +- .../frontend/mysql/authentication/MySQLAuthenticationEngineTest.java | 2 +- .../command/query/extended/describe/PostgreSQLComDescribeExecutor.java | 2 +- .../query/extended/describe/PostgreSQLComDescribeExecutorTest.java | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/infra/exception/dialect/type/mysql/src/main/java/org/apache/shardingsphere/infra/exception/mysql/exception/AccessDeniedException.java b/infra/exception/dialect/core/src/main/java/org/apache/shardingsphere/infra/exception/dialect/exception/connection/AccessDeniedException.java similarity index 94% rename from infra/exception/dialect/type/mysql/src/main/java/org/apache/shardingsphere/infra/exception/mysql/exception/AccessDeniedException.java rename to infra/exception/dialect/core/src/main/java/org/apache/shardingsphere/infra/exception/dialect/exception/connection/AccessDeniedException.java index b3db8149ae6..56e04c51638 100644 --- a/infra/exception/dialect/type/mysql/src/main/java/org/apache/shardingsphere/infra/exception/mysql/exception/AccessDeniedException.java +++ b/infra/exception/dialect/core/src/main/java/org/apache/shardingsphere/infra/exception/dialect/exception/connection/AccessDeniedException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.infra.exception.mysql.exception; +package org.apache.shardingsphere.infra.exception.dialect.exception.connection; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/infra/exception/dialect/type/postgresql/src/main/java/org/apache/shardingsphere/infra/exception/postgresql/exception/metadata/ColumnNotFoundException.java b/infra/exception/dialect/core/src/main/java/org/apache/shardingsphere/infra/exception/dialect/exception/syntax/column/ColumnNotFoundException.java similarity index 93% rename from infra/exception/dialect/type/postgresql/src/main/java/org/apache/shardingsphere/infra/exception/postgresql/exception/metadata/ColumnNotFoundException.java rename to infra/exception/dialect/core/src/main/java/org/apache/shardingsphere/infra/exception/dialect/exception/syntax/column/ColumnNotFoundException.java index 596535e8f67..e52517a18d6 100644 --- a/infra/exception/dialect/type/postgresql/src/main/java/org/apache/shardingsphere/infra/exception/postgresql/exception/metadata/ColumnNotFoundException.java +++ b/infra/exception/dialect/core/src/main/java/org/apache/shardingsphere/infra/exception/dialect/exception/syntax/column/ColumnNotFoundException.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.infra.exception.postgresql.exception.metadata; +package org.apache.shardingsphere.infra.exception.dialect.exception.syntax.column; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/infra/exception/dialect/type/mysql/src/main/java/org/apache/shardingsphere/infra/exception/mysql/mapper/MySQLDialectExceptionMapper.java b/infra/exception/dialect/type/mysql/src/main/java/org/apache/shardingsphere/infra/exception/mysql/mapper/MySQLDialectExceptionMapper.java index d820671e24c..b422d1402cd 100644 --- a/infra/exception/dialect/type/mysql/src/main/java/org/apache/shardingsphere/infra/exception/mysql/mapper/MySQLDialectExceptionMapper.java +++ b/infra/exception/dialect/type/mysql/src/main/java/org/apache/shardingsphere/infra/exception/mysql/mapper/MySQLDialectExceptionMapper.java @@ -30,7 +30,7 @@ import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.table. import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.table.TableExistsException; import org.apache.shardingsphere.infra.exception.dialect.exception.transaction.TableModifyInTransactionException; import org.apache.shardingsphere.infra.exception.dialect.mapper.SQLDialectExceptionMapper; -import org.apache.shardingsphere.infra.exception.mysql.exception.AccessDeniedException; +import org.apache.shardingsphere.infra.exception.dialect.exception.connection.AccessDeniedException; import org.apache.shardingsphere.infra.exception.mysql.exception.DatabaseAccessDeniedException; import org.apache.shardingsphere.infra.exception.mysql.exception.ErrorGlobalVariableException; import org.apache.shardingsphere.infra.exception.mysql.exception.ErrorLocalVariableException; diff --git a/infra/exception/dialect/type/mysql/src/test/java/org/apache/shardingsphere/infra/exception/mysql/mapper/MySQLDialectExceptionMapperTest.java b/infra/exception/dialect/type/mysql/src/test/java/org/apache/shardingsphere/infra/exception/mysql/mapper/MySQLDialectExceptionMapperTest.java index a7a760acbce..89adc5c70e7 100644 --- a/infra/exception/dialect/type/mysql/src/test/java/org/apache/shardingsphere/infra/exception/mysql/mapper/MySQLDialectExceptionMapperTest.java +++ b/infra/exception/dialect/type/mysql/src/test/java/org/apache/shardingsphere/infra/exception/mysql/mapper/MySQLDialectExceptionMapperTest.java @@ -28,7 +28,7 @@ import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.databa import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.table.NoSuchTableException; import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.table.TableExistsException; import org.apache.shardingsphere.infra.exception.dialect.exception.transaction.TableModifyInTransactionException; -import org.apache.shardingsphere.infra.exception.mysql.exception.AccessDeniedException; +import org.apache.shardingsphere.infra.exception.dialect.exception.connection.AccessDeniedException; import org.apache.shardingsphere.infra.exception.mysql.exception.DatabaseAccessDeniedException; import org.apache.shardingsphere.infra.exception.mysql.exception.ErrorGlobalVariableException; import org.apache.shardingsphere.infra.exception.mysql.exception.ErrorLocalVariableException; diff --git a/infra/exception/dialect/type/postgresql/src/main/java/org/apache/shardingsphere/infra/exception/postgresql/mapper/PostgreSQLDialectExceptionMapper.java b/infra/exception/dialect/type/postgresql/src/main/java/org/apache/shardingsphere/infra/exception/postgresql/mapper/PostgreSQLDialectExceptionMapper.java index 41cf52d1b7c..7c9ff1fe3fc 100644 --- a/infra/exception/dialect/type/postgresql/src/main/java/org/apache/shardingsphere/infra/exception/postgresql/mapper/PostgreSQLDialectExceptionMapper.java +++ b/infra/exception/dialect/type/postgresql/src/main/java/org/apache/shardingsphere/infra/exception/postgresql/mapper/PostgreSQLDialectExceptionMapper.java @@ -33,7 +33,7 @@ import org.apache.shardingsphere.infra.exception.postgresql.exception.authority. import org.apache.shardingsphere.infra.exception.postgresql.exception.authority.InvalidPasswordException; import org.apache.shardingsphere.infra.exception.postgresql.exception.authority.PrivilegeNotGrantedException; import org.apache.shardingsphere.infra.exception.postgresql.exception.authority.UnknownUsernameException; -import org.apache.shardingsphere.infra.exception.postgresql.exception.metadata.ColumnNotFoundException; +import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.column.ColumnNotFoundException; import org.apache.shardingsphere.infra.exception.postgresql.exception.protocol.ProtocolViolationException; import org.apache.shardingsphere.infra.exception.postgresql.sqlstate.PostgreSQLState; import org.apache.shardingsphere.infra.exception.postgresql.vendor.PostgreSQLVendorError; 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 149ca16af04..00cccb762fa 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 @@ -50,7 +50,7 @@ import org.apache.shardingsphere.infra.exception.core.external.sql.type.kernel.c import org.apache.shardingsphere.infra.exception.dialect.SQLExceptionTransformEngine; import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.database.UnknownDatabaseException; import org.apache.shardingsphere.infra.exception.kernel.metadata.rule.MissingRequiredRuleException; -import org.apache.shardingsphere.infra.exception.mysql.exception.AccessDeniedException; +import org.apache.shardingsphere.infra.exception.dialect.exception.connection.AccessDeniedException; import org.apache.shardingsphere.infra.metadata.user.Grantee; import org.apache.shardingsphere.infra.metadata.user.ShardingSphereUser; import org.apache.shardingsphere.proxy.backend.context.ProxyContext; diff --git a/proxy/frontend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationEngine.java b/proxy/frontend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationEngine.java index 7b712a0ac96..a0d54fa1d7f 100644 --- a/proxy/frontend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationEngine.java +++ b/proxy/frontend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationEngine.java @@ -43,7 +43,7 @@ import org.apache.shardingsphere.db.protocol.mysql.packet.handshake.MySQLHandsha import org.apache.shardingsphere.db.protocol.mysql.payload.MySQLPacketPayload; import org.apache.shardingsphere.db.protocol.payload.PacketPayload; import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.database.UnknownDatabaseException; -import org.apache.shardingsphere.infra.exception.mysql.exception.AccessDeniedException; +import org.apache.shardingsphere.infra.exception.dialect.exception.connection.AccessDeniedException; import org.apache.shardingsphere.infra.exception.mysql.exception.DatabaseAccessDeniedException; import org.apache.shardingsphere.infra.exception.mysql.exception.HandshakeException; import org.apache.shardingsphere.infra.metadata.user.Grantee; diff --git a/proxy/frontend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareParameterMarkerExtractor.java b/proxy/frontend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareParameterMarkerExtractor.java index d62870f09d0..d53ae67e751 100644 --- a/proxy/frontend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareParameterMarkerExtractor.java +++ b/proxy/frontend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareParameterMarkerExtractor.java @@ -20,7 +20,7 @@ package org.apache.shardingsphere.proxy.frontend.mysql.command.query.binary.prep import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; -import org.apache.shardingsphere.infra.exception.postgresql.exception.metadata.ColumnNotFoundException; +import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.column.ColumnNotFoundException; import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereColumn; import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema; import org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable; diff --git a/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationEngineTest.java b/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationEngineTest.java index 64be18b7f66..c550effb1f6 100644 --- a/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationEngineTest.java +++ b/proxy/frontend/type/mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/authentication/MySQLAuthenticationEngineTest.java @@ -38,7 +38,7 @@ import org.apache.shardingsphere.db.protocol.mysql.packet.handshake.MySQLHandsha import org.apache.shardingsphere.db.protocol.mysql.payload.MySQLPacketPayload; import org.apache.shardingsphere.infra.database.core.type.DatabaseType; import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.database.UnknownDatabaseException; -import org.apache.shardingsphere.infra.exception.mysql.exception.AccessDeniedException; +import org.apache.shardingsphere.infra.exception.dialect.exception.connection.AccessDeniedException; import org.apache.shardingsphere.infra.exception.mysql.exception.DatabaseAccessDeniedException; import org.apache.shardingsphere.infra.exception.mysql.exception.HandshakeException; import org.apache.shardingsphere.infra.exception.mysql.vendor.MySQLVendorError; diff --git a/proxy/frontend/type/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutor.java b/proxy/frontend/type/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutor.java index ac1ccea702c..03e2f59b58b 100644 --- a/proxy/frontend/type/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutor.java +++ b/proxy/frontend/type/postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutor.java @@ -31,7 +31,7 @@ import org.apache.shardingsphere.infra.connection.kernel.KernelProcessor; import org.apache.shardingsphere.infra.database.core.type.DatabaseTypeRegistry; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; import org.apache.shardingsphere.infra.exception.generic.UnsupportedSQLOperationException; -import org.apache.shardingsphere.infra.exception.postgresql.exception.metadata.ColumnNotFoundException; +import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.column.ColumnNotFoundException; import org.apache.shardingsphere.infra.executor.sql.context.ExecutionContext; import org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit; import org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode; diff --git a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java index 74f57509cdd..2c1cd1e7afd 100644 --- a/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java +++ b/proxy/frontend/type/postgresql/src/test/java/org/apache/shardingsphere/proxy/frontend/postgresql/command/query/extended/describe/PostgreSQLComDescribeExecutorTest.java @@ -32,7 +32,7 @@ import org.apache.shardingsphere.infra.binder.context.statement.dml.SelectStatem import org.apache.shardingsphere.infra.config.props.ConfigurationPropertyKey; import org.apache.shardingsphere.infra.database.core.type.DatabaseType; import org.apache.shardingsphere.infra.exception.generic.UnsupportedSQLOperationException; -import org.apache.shardingsphere.infra.exception.postgresql.exception.metadata.ColumnNotFoundException; +import org.apache.shardingsphere.infra.exception.dialect.exception.syntax.column.ColumnNotFoundException; import org.apache.shardingsphere.infra.executor.sql.execute.engine.ConnectionMode; import org.apache.shardingsphere.infra.hint.HintValueContext; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;