You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by yx...@apache.org on 2022/09/11 12:26:10 UTC

[shardingsphere] branch master updated: Redefine ShardingSQLException's vendor codes (#20927)

This is an automated email from the ASF dual-hosted git repository.

yx9o 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 3c708bcbf69 Redefine ShardingSQLException's vendor codes (#20927)
3c708bcbf69 is described below

commit 3c708bcbf69ef34c6e038d82ccad9b56831b75e3
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sun Sep 11 20:26:02 2022 +0800

    Redefine ShardingSQLException's vendor codes (#20927)
---
 .../user-manual/error-code/sql-error-code.cn.md    | 54 +++++++++++-----------
 .../user-manual/error-code/sql-error-code.en.md    | 54 +++++++++++-----------
 .../ClassBasedShardingAlgorithmFactory.java        |  2 +-
 .../datetime/AutoIntervalShardingAlgorithm.java    |  2 +-
 .../datetime/IntervalShardingAlgorithm.java        |  2 +-
 .../sharding/inline/InlineShardingAlgorithm.java   |  2 +-
 .../GenerateKeyStrategyNotFoundException.java      |  5 +-
 ...rdingAlgorithmExpressionAndColumnException.java |  5 +-
 ...rdingAlgorithmClassImplementationException.java |  5 +-
 .../ShardingRouteAlgorithmException.java           |  5 +-
 .../CursorNameNotFoundException.java               |  5 +-
 .../EmptyShardingRouteResultException.java         |  5 +-
 .../ShardingDDLRouteException.java                 |  5 +-
 .../{ => data}/InvalidDatetimeFormatException.java |  5 +-
 .../{ => data}/NullShardingValueException.java     |  3 +-
 .../{ => data}/ShardingValueDataTypeException.java |  3 +-
 .../ActualTableNotFoundException.java              |  5 +-
 .../BindingTableNotFoundException.java             |  5 +-
 .../{ => metadata}/DataNodeGenerateException.java  |  5 +-
 ...DataNodesMissedWithShardingTableException.java} | 11 +++--
 .../{ => metadata}/DropInUsedTablesException.java  |  5 +-
 .../{ => metadata}/DuplicatedIndexException.java   |  5 +-
 .../{ => metadata}/EngagedViewException.java       |  5 +-
 ...InconsistentShardingTableMetaDataException.java |  3 +-
 .../{ => metadata}/IndexNotExistedException.java   |  5 +-
 .../ShardingRuleNotFoundException.java             |  5 +-
 .../DMLMultipleDataNodesWithLimitException.java    |  5 +-
 .../DMLWithMultipleShardingTablesException.java    |  5 +-
 .../DataSourceIntersectionNotFoundException.java   |  5 +-
 .../InsertSelectTableViolationException.java       |  5 +-
 ...GenerateKeyColumnWithInsertSelectException.java |  5 +-
 ...amedViewWithoutSameConfigurationException.java} | 11 +++--
 .../UnsupportedCreateViewException.java            |  5 +-
 ...ortedPrepareRouteToSameDataSourceException.java |  5 +-
 .../UnsupportedShardingOperationException.java     |  5 +-
 .../UnsupportedUpdatingShardingValueException.java |  5 +-
 .../merge/ddl/fetch/FetchStreamMergedResult.java   |  2 +-
 .../metadata/ShardingSchemaMetaDataDecorator.java  |  2 +-
 .../impl/InsertClauseShardingConditionEngine.java  |  2 +-
 .../impl/WhereClauseShardingConditionEngine.java   |  2 +-
 .../type/complex/ShardingComplexRoutingEngine.java |  2 +-
 .../type/unicast/ShardingUnicastRoutingEngine.java |  2 +-
 .../ddl/ShardingDDLStatementValidator.java         |  2 +-
 .../impl/ShardingAlterIndexStatementValidator.java |  4 +-
 .../impl/ShardingAlterTableStatementValidator.java |  4 +-
 .../impl/ShardingAlterViewStatementValidator.java  |  6 +--
 .../ShardingCreateIndexStatementValidator.java     |  2 +-
 .../ShardingCreateTableStatementValidator.java     |  2 +-
 .../impl/ShardingCreateViewStatementValidator.java |  4 +-
 .../impl/ShardingDropIndexStatementValidator.java  |  4 +-
 .../impl/ShardingDropTableStatementValidator.java  |  6 +--
 .../impl/ShardingPrepareStatementValidator.java    |  4 +-
 .../ShardingRenameTableStatementValidator.java     |  4 +-
 .../dml/ShardingDMLStatementValidator.java         |  2 +-
 .../dml/impl/ShardingCopyStatementValidator.java   |  2 +-
 .../dml/impl/ShardingDeleteStatementValidator.java |  2 +-
 .../dml/impl/ShardingInsertStatementValidator.java |  6 +--
 .../dml/impl/ShardingUpdateStatementValidator.java |  4 +-
 .../type/standard/StandardShardingStrategy.java    |  2 +-
 .../sharding/rule/BindingTableRule.java            |  4 +-
 .../shardingsphere/sharding/rule/ShardingRule.java |  4 +-
 .../shardingsphere/sharding/rule/TableRule.java    |  6 +--
 .../ClassBasedShardingAlgorithmFactoryTest.java    |  2 +-
 .../ClassBasedShardingAlgorithmTest.java           |  2 +-
 .../inline/InlineShardingAlgorithmTest.java        |  2 +-
 .../complex/ShardingComplexRoutingEngineTest.java  |  2 +-
 .../ShardingStandardRoutingEngineTest.java         |  2 +-
 .../unicast/ShardingUnicastRoutingEngineTest.java  |  2 +-
 .../ShardingAlterIndexStatementValidatorTest.java  |  4 +-
 .../ShardingAlterTableStatementValidatorTest.java  |  4 +-
 .../ShardingAlterViewStatementValidatorTest.java   |  6 +--
 .../ShardingCreateIndexStatementValidatorTest.java |  2 +-
 .../ShardingCreateTableStatementValidatorTest.java |  2 +-
 .../ShardingCreateViewStatementValidatorTest.java  |  4 +-
 .../ShardingDropIndexStatementValidatorTest.java   |  4 +-
 .../ShardingDropTableStatementValidatorTest.java   |  4 +-
 .../ddl/ShardingPrepareStatementValidatorTest.java |  4 +-
 .../ShardingRenameTableStatementValidatorTest.java |  4 +-
 .../dml/ShardingCopyStatementValidatorTest.java    |  2 +-
 .../dml/ShardingDeleteStatementValidatorTest.java  |  2 +-
 .../dml/ShardingInsertStatementValidatorTest.java  |  8 ++--
 .../dml/ShardingUpdateStatementValidatorTest.java  |  4 +-
 .../sharding/rule/BindingTableRuleTest.java        |  4 +-
 .../sharding/rule/ShardingRuleTest.java            |  4 +-
 .../sharding/rule/TableRuleTest.java               |  4 +-
 .../checker/ShardingTableRuleStatementChecker.java |  2 +-
 86 files changed, 234 insertions(+), 204 deletions(-)

diff --git a/docs/document/content/user-manual/error-code/sql-error-code.cn.md b/docs/document/content/user-manual/error-code/sql-error-code.cn.md
index e435202e32f..0ac1a75c814 100644
--- a/docs/document/content/user-manual/error-code/sql-error-code.cn.md
+++ b/docs/document/content/user-manual/error-code/sql-error-code.cn.md
@@ -98,36 +98,36 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,
 
 | SQL State | Vendor Code | 错误信息 |
 | --------- | ----------- | ------ |
-| HY000     | 20000       | Sharding algorithm class \`%s\` should be implement \`%s\` |
+| 44000     | 20000       | Can not find table rule with logic tables \`%s\` |
 | 44000     | 20001       | Can not get uniformed table structure for logic table \`%s\`, it has different meta data of actual tables are as follows: %s |
-| 42S02     | 20002       | Can not get route result, please check your sharding rule configuration |
-| 44000     | 20003       | Can not find table rule with logic tables \`%s\` |
+| 42S02     | 20002       | Can not find data source in sharding rule, invalid actual data node \`%s\` |
+| 44000     | 20003       | Data nodes must be configured for sharding table \`%s\` |
+| 44000     | 20004       | Actual table \`%s.%s\` is not in table rule configuration |
+| 44000     | 20005       | Can not find binding actual table, data source is \`%s\`, logic table is \`%s\`, other actual table is \`%s\` |
+| 44000     | 20006       | Actual tables \`%s\` are in use |
+| 42S01     | 20007       | Index \`%s\` already exists |
+| 42S02     | 20008       | Index \`%s\` does not exist |
+| 42S01     | 20009       | View name has to bind to %s tables |
 | 44000     | 20010       | Sharding value can't be null in insert statement |
 | HY004     | 20011       | Found different types for sharding value \`%s\` |
-| 44000     | 20012       | Can not update sharding value for table \`%s\` |
-| 0A000     | 20013       | Can not support operation \`%s\` with sharding table \`%s\` |
-| 0A000     | 20014       | Can not support DML operation with multiple tables \`%s\` |
-| 0A000     | 20015       | The CREATE VIEW statement contains unsupported query statement |
-| 42000     | 20016       | %s ... LIMIT can not support route to multiple data nodes |
-| 44000     | 20017       | PREPARE statement can not support sharding tables route to same data sources |
-| 42000     | 20018       | INSERT INTO ... SELECT can not support applying key generator with absent generate key column |
-| 44000     | 20019       | The table inserted and the table selected must be the same or bind tables |
-| 44000     | 20020       | Inline sharding algorithms expression \`%s\` and sharding column \`%s\` do not match |
-| 44000     | 20021       | Actual data nodes must be configured for sharding table \`%s\` |
-| 44000     | 20022       | Actual table \`%s.%s\` is not in table rule configuration |
-| 44000     | 20023       | Can not find actual data source intersection for logic tables \`%s\` |
-| 44000     | 20024       | Can not find binding actual table, data source is \`%s\`, logic table is \`%s\`, other actual table is \`%s\` |
-| 44000     | 20025       | Can not find strategy for generate keys with table \`%s\` |
-| HY004     | 20026       | Invalid %s, datetime pattern should be \`%s\`, value is \`%s\` |
-| 42S01     | 20030       | Index \`%s\` already exists |
-| 42S02     | 20031       | Index \`%s\` does not exist |
-| 44000     | 20032       | Actual tables \`%s\` are in use |
-| 42S01     | 20033       | View name has to bind to %s tables |
-| 0A000     | 20034       | Alter view rename .. to .. statement should have same config for \`%s\` and \`%s\` |
-| HY000     | 20050       | Routed target \`%s\` does not exist, available targets are \`%s\` |
-| HY000     | 20051       | \`%s %s\` can not route correctly for %s \`%s\` |
-| 42S02     | 20052       | Can not find data source in sharding rule, invalid actual data node \`%s\` |
-| 34000     | 20053       | Can not get cursor name from fetch statement |
+| HY004     | 20012       | Invalid %s, datetime pattern should be \`%s\`, value is \`%s\` |
+| 0A000     | 20020       | Can not support operation \`%s\` with sharding table \`%s\` |
+| 44000     | 20021       | Can not update sharding value for table \`%s\` |
+| 0A000     | 20022       | The CREATE VIEW statement contains unsupported query statement |
+| 44000     | 20023       | PREPARE statement can not support sharding tables route to same data sources |
+| 44000     | 20024       | The table inserted and the table selected must be the same or bind tables |
+| 0A000     | 20025       | Can not support DML operation with multiple tables \`%s\` |
+| 42000     | 20026       | %s ... LIMIT can not support route to multiple data nodes |
+| 44000     | 20027       | Can not find actual data source intersection for logic tables \`%s\` |
+| 42000     | 20028       | INSERT INTO ... SELECT can not support applying key generator with absent generate key column |
+| 0A000     | 20029       | Alter view rename .. to .. statement should have same config for \`%s\` and \`%s\` |
+| HY000     | 20030       | \`%s %s\` can not route correctly for %s \`%s\` |
+| 42S02     | 20031       | Can not get route result, please check your sharding rule configuration |
+| 34000     | 20032       | Can not get cursor name from fetch statement |
+| HY000     | 20080       | Sharding algorithm class \`%s\` should be implement \`%s\` |
+| HY000     | 20081       | Routed target \`%s\` does not exist, available targets are \`%s\` |
+| 44000     | 20082       | Inline sharding algorithms expression \`%s\` and sharding column \`%s\` do not match |
+| 44000     | 20090       | Can not find strategy for generate keys with table \`%s\` |
 
 ### 数据库高可用
 
diff --git a/docs/document/content/user-manual/error-code/sql-error-code.en.md b/docs/document/content/user-manual/error-code/sql-error-code.en.md
index 75541706d46..12157a5019c 100644
--- a/docs/document/content/user-manual/error-code/sql-error-code.en.md
+++ b/docs/document/content/user-manual/error-code/sql-error-code.en.md
@@ -98,36 +98,36 @@ SQL error codes provide by standard `SQL State`, `Vendor Code` and `Reason`, whi
 
 | SQL State | Vendor Code | Reason |
 | --------- | ----------- | ------ |
-| HY000     | 20000       | Sharding algorithm class \`%s\` should be implement \`%s\` |
+| 44000     | 20000       | Can not find table rule with logic tables \`%s\` |
 | 44000     | 20001       | Can not get uniformed table structure for logic table \`%s\`, it has different meta data of actual tables are as follows: %s |
-| 42S02     | 20002       | Can not get route result, please check your sharding rule configuration |
-| 44000     | 20003       | Can not find table rule with logic tables \`%s\` |
+| 42S02     | 20002       | Can not find data source in sharding rule, invalid actual data node \`%s\` |
+| 44000     | 20003       | Data nodes must be configured for sharding table \`%s\` |
+| 44000     | 20004       | Actual table \`%s.%s\` is not in table rule configuration |
+| 44000     | 20005       | Can not find binding actual table, data source is \`%s\`, logic table is \`%s\`, other actual table is \`%s\` |
+| 44000     | 20006       | Actual tables \`%s\` are in use |
+| 42S01     | 20007       | Index \`%s\` already exists |
+| 42S02     | 20008       | Index \`%s\` does not exist |
+| 42S01     | 20009       | View name has to bind to %s tables |
 | 44000     | 20010       | Sharding value can't be null in insert statement |
 | HY004     | 20011       | Found different types for sharding value \`%s\` |
-| 44000     | 20012       | Can not update sharding value for table \`%s\` |
-| 0A000     | 20013       | Can not support operation \`%s\` with sharding table \`%s\` |
-| 0A000     | 20014       | Can not support DML operation with multiple tables \`%s\` |
-| 0A000     | 20015       | The CREATE VIEW statement contains unsupported query statement |
-| 42000     | 20016       | %s ... LIMIT can not support route to multiple data nodes |
-| 44000     | 20017       | PREPARE statement can not support sharding tables route to same data sources |
-| 42000     | 20018       | INSERT INTO ... SELECT can not support applying key generator with absent generate key column |
-| 44000     | 20019       | The table inserted and the table selected must be the same or bind tables |
-| 44000     | 20020       | Inline sharding algorithms expression \`%s\` and sharding column \`%s\` do not match |
-| 44000     | 20021       | Actual data nodes must be configured for sharding table \`%s\` |
-| 44000     | 20022       | Actual table \`%s.%s\` is not in table rule configuration |
-| 44000     | 20023       | Can not find actual data source intersection for logic tables \`%s\` |
-| 44000     | 20024       | Can not find binding actual table, data source is \`%s\`, logic table is \`%s\`, other actual table is \`%s\` |
-| 44000     | 20025       | Can not find strategy for generate keys with table \`%s\` |
-| HY004     | 20026       | Invalid %s, datetime pattern should be \`%s\`, value is \`%s\` |
-| 42S01     | 20030       | Index \`%s\` already exists |
-| 42S02     | 20031       | Index \`%s\` does not exist |
-| 44000     | 20032       | Actual tables \`%s\` are in use |
-| 42S01     | 20033       | View name has to bind to %s tables |
-| 0A000     | 20034       | Alter view rename .. to .. statement should have same config for \`%s\` and \`%s\` |
-| HY000     | 20050       | Routed target \`%s\` does not exist, available targets are \`%s\` |
-| HY000     | 20051       | \`%s %s\` can not route correctly for %s \`%s\` |
-| 42S02     | 20052       | Can not find data source in sharding rule, invalid actual data node \`%s\` |
-| 34000     | 20053       | Can not get cursor name from fetch statement |
+| HY004     | 20012       | Invalid %s, datetime pattern should be \`%s\`, value is \`%s\` |
+| 0A000     | 20020       | Can not support operation \`%s\` with sharding table \`%s\` |
+| 44000     | 20021       | Can not update sharding value for table \`%s\` |
+| 0A000     | 20022       | The CREATE VIEW statement contains unsupported query statement |
+| 44000     | 20023       | PREPARE statement can not support sharding tables route to same data sources |
+| 44000     | 20024       | The table inserted and the table selected must be the same or bind tables |
+| 0A000     | 20025       | Can not support DML operation with multiple tables \`%s\` |
+| 42000     | 20026       | %s ... LIMIT can not support route to multiple data nodes |
+| 44000     | 20027       | Can not find actual data source intersection for logic tables \`%s\` |
+| 42000     | 20028       | INSERT INTO ... SELECT can not support applying key generator with absent generate key column |
+| 0A000     | 20029       | Alter view rename .. to .. statement should have same config for \`%s\` and \`%s\` |
+| HY000     | 20030       | \`%s %s\` can not route correctly for %s \`%s\` |
+| 42S02     | 20031       | Can not get route result, please check your sharding rule configuration |
+| 34000     | 20032       | Can not get cursor name from fetch statement |
+| HY000     | 20080       | Sharding algorithm class \`%s\` should be implement \`%s\` |
+| HY000     | 20081       | Routed target \`%s\` does not exist, available targets are \`%s\` |
+| 44000     | 20082       | Inline sharding algorithms expression \`%s\` and sharding column \`%s\` do not match |
+| 44000     | 20090       | Can not find strategy for generate keys with table \`%s\` |
 
 ### Database HA
 
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactory.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactory.java
index 0b63c8eedd8..abfb4d1af78 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactory.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactory.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.sharding.algorithm.sharding.classbased;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import lombok.SneakyThrows;
-import org.apache.shardingsphere.sharding.exception.ShardingAlgorithmClassImplementationException;
+import org.apache.shardingsphere.sharding.exception.algorithm.ShardingAlgorithmClassImplementationException;
 import org.apache.shardingsphere.sharding.spi.ShardingAlgorithm;
 
 import java.util.Properties;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/AutoIntervalShardingAlgorithm.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/AutoIntervalShardingAlgorithm.java
index e01d0ea6e58..ff96dce357e 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/AutoIntervalShardingAlgorithm.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/AutoIntervalShardingAlgorithm.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.sharding.api.sharding.ShardingAutoTableAlgorith
 import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
 import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
 import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
-import org.apache.shardingsphere.sharding.exception.InvalidDatetimeFormatException;
+import org.apache.shardingsphere.sharding.exception.data.InvalidDatetimeFormatException;
 
 import java.text.DecimalFormat;
 import java.text.ParsePosition;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/IntervalShardingAlgorithm.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/IntervalShardingAlgorithm.java
index 0db5042d8e2..abdf13b8b7a 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/IntervalShardingAlgorithm.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/datetime/IntervalShardingAlgorithm.java
@@ -25,7 +25,7 @@ import org.apache.shardingsphere.infra.util.exception.external.sql.type.generic.
 import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
 import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
 import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
-import org.apache.shardingsphere.sharding.exception.InvalidDatetimeFormatException;
+import org.apache.shardingsphere.sharding.exception.data.InvalidDatetimeFormatException;
 
 import java.time.Instant;
 import java.time.LocalDate;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithm.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithm.java
index 58b6cc8acf1..d3783070727 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithm.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithm.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.infra.util.expr.InlineExpressionParser;
 import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
 import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
 import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
-import org.apache.shardingsphere.sharding.exception.MismatchedInlineShardingAlgorithmExpressionAndColumnException;
+import org.apache.shardingsphere.sharding.exception.algorithm.MismatchedInlineShardingAlgorithmExpressionAndColumnException;
 
 import java.util.Collection;
 import java.util.Properties;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/GenerateKeyStrategyNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/GenerateKeyStrategyNotFoundException.java
similarity index 86%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/GenerateKeyStrategyNotFoundException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/GenerateKeyStrategyNotFoundException.java
index 5e1919ddd92..614a5ea82a2 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/GenerateKeyStrategyNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/GenerateKeyStrategyNotFoundException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Generate key strategy not found exception.
@@ -27,6 +28,6 @@ public final class GenerateKeyStrategyNotFoundException extends ShardingSQLExcep
     private static final long serialVersionUID = 7456922260524630374L;
     
     public GenerateKeyStrategyNotFoundException(final String tableName) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 50, "Can not find strategy for generate keys with table `%s`", tableName);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 90, "Can not find strategy for generate keys with table `%s`", tableName);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
similarity index 87%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
index 1706560e890..c3905190fe2 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Mismatched inline sharding algorithm's expression and column exception.
@@ -27,6 +28,6 @@ public final class MismatchedInlineShardingAlgorithmExpressionAndColumnException
     private static final long serialVersionUID = 1306301016127278233L;
     
     public MismatchedInlineShardingAlgorithmExpressionAndColumnException(final String algorithmExpression, final String columnName) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20, "Inline sharding algorithms expression `%s` and sharding column `%s` do not match", algorithmExpression, columnName);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 82, "Inline sharding algorithms expression `%s` and sharding column `%s` do not match", algorithmExpression, columnName);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingAlgorithmClassImplementationException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingAlgorithmClassImplementationException.java
similarity index 80%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingAlgorithmClassImplementationException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingAlgorithmClassImplementationException.java
index f7b4dae9d08..6ad35a76294 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingAlgorithmClassImplementationException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingAlgorithmClassImplementationException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Sharding algorithm class implementation exception.
@@ -27,6 +28,6 @@ public final class ShardingAlgorithmClassImplementationException extends Shardin
     private static final long serialVersionUID = 3053033454701332815L;
     
     public ShardingAlgorithmClassImplementationException(final String shardingAlgorithmClassName, final Class<?> superShardingAlgorithmClass) {
-        super(XOpenSQLState.GENERAL_ERROR, 0, "Sharding algorithm class `%s` should be implement `%s`", shardingAlgorithmClassName, superShardingAlgorithmClass.getName());
+        super(XOpenSQLState.GENERAL_ERROR, 80, "Sharding algorithm class `%s` should be implement `%s`", shardingAlgorithmClassName, superShardingAlgorithmClass.getName());
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRouteAlgorithmException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingRouteAlgorithmException.java
similarity index 87%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRouteAlgorithmException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingRouteAlgorithmException.java
index 3ef4247c06f..b3c19506773 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRouteAlgorithmException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingRouteAlgorithmException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 import java.util.Collection;
 
@@ -29,6 +30,6 @@ public final class ShardingRouteAlgorithmException extends ShardingSQLException
     private static final long serialVersionUID = -1935526748399934543L;
     
     public ShardingRouteAlgorithmException(final String routedTargetName, final Collection<String> availableTargetNames) {
-        super(XOpenSQLState.GENERAL_ERROR, 50, "Routed target `%s` does not exist, available targets are `%s`", routedTargetName, availableTargetNames.toString());
+        super(XOpenSQLState.GENERAL_ERROR, 81, "Routed target `%s` does not exist, available targets are `%s`", routedTargetName, availableTargetNames.toString());
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/CursorNameNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/CursorNameNotFoundException.java
similarity index 85%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/CursorNameNotFoundException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/CursorNameNotFoundException.java
index 97771d926a3..818d19759be 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/CursorNameNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/CursorNameNotFoundException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.connection;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Cursor name not found exception.
@@ -27,6 +28,6 @@ public final class CursorNameNotFoundException extends ShardingSQLException {
     private static final long serialVersionUID = 3124329832945598311L;
     
     public CursorNameNotFoundException() {
-        super(XOpenSQLState.INVALID_CURSOR_NAME, 53, "Can not get cursor name from fetch statement");
+        super(XOpenSQLState.INVALID_CURSOR_NAME, 32, "Can not get cursor name from fetch statement");
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EmptyShardingRouteResultException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/EmptyShardingRouteResultException.java
similarity index 81%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EmptyShardingRouteResultException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/EmptyShardingRouteResultException.java
index a7f3f35ed69..9fb3334eb38 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EmptyShardingRouteResultException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/EmptyShardingRouteResultException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.connection;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Empty sharding route result exception.
@@ -27,6 +28,6 @@ public final class EmptyShardingRouteResultException extends ShardingSQLExceptio
     private static final long serialVersionUID = -6548076668933945656L;
     
     public EmptyShardingRouteResultException() {
-        super(XOpenSQLState.NOT_FOUND, 2, "Can not get route result, please check your sharding rule configuration");
+        super(XOpenSQLState.NOT_FOUND, 31, "Can not get route result, please check your sharding rule configuration");
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingDDLRouteException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/ShardingDDLRouteException.java
similarity index 86%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingDDLRouteException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/ShardingDDLRouteException.java
index 29d45222a07..45b31bb472b 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingDDLRouteException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/ShardingDDLRouteException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.connection;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 import java.util.Collection;
 
@@ -29,6 +30,6 @@ public final class ShardingDDLRouteException extends ShardingSQLException {
     private static final long serialVersionUID = 1611718269096645289L;
     
     public ShardingDDLRouteException(final String operation, final String objectType, final Collection<String> objectNames) {
-        super(XOpenSQLState.GENERAL_ERROR, 51, "`%s %s` can not route correctly for %s `%s`", operation, objectType, objectType, objectNames.toString());
+        super(XOpenSQLState.GENERAL_ERROR, 30, "`%s %s` can not route correctly for %s `%s`", operation, objectType, objectType, objectNames.toString());
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InvalidDatetimeFormatException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/data/InvalidDatetimeFormatException.java
similarity index 87%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InvalidDatetimeFormatException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/data/InvalidDatetimeFormatException.java
index 659dea92a1a..5b777a9deb2 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InvalidDatetimeFormatException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/data/InvalidDatetimeFormatException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.data;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Invalid datetime format exception.
@@ -27,6 +28,6 @@ public final class InvalidDatetimeFormatException extends ShardingSQLException {
     private static final long serialVersionUID = 4472952142748467059L;
     
     public InvalidDatetimeFormatException(final String dateTimeKey, final String dateTimeValue, final String dateTimePattern) {
-        super(XOpenSQLState.INVALID_DATA_TYPE, 26, "Invalid %s, datetime pattern should be `%s`, value is `%s`", dateTimeKey, dateTimePattern, dateTimeValue);
+        super(XOpenSQLState.INVALID_DATA_TYPE, 12, "Invalid %s, datetime pattern should be `%s`, value is `%s`", dateTimeKey, dateTimePattern, dateTimeValue);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/NullShardingValueException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/data/NullShardingValueException.java
similarity index 90%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/NullShardingValueException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/data/NullShardingValueException.java
index a58410dd0af..82d01cebe02 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/NullShardingValueException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/data/NullShardingValueException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.data;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Null sharding value exception.
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingValueDataTypeException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/data/ShardingValueDataTypeException.java
similarity index 91%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingValueDataTypeException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/data/ShardingValueDataTypeException.java
index 301aa00aee3..8d81f815611 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingValueDataTypeException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/data/ShardingValueDataTypeException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.data;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 import org.apache.shardingsphere.sharding.route.engine.condition.Column;
 
 /**
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualTableNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ActualTableNotFoundException.java
similarity index 81%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualTableNotFoundException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ActualTableNotFoundException.java
index 6b31bec752a..5e4523c8b16 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualTableNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ActualTableNotFoundException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.metadata;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Actual table not found exception.
@@ -27,6 +28,6 @@ public final class ActualTableNotFoundException extends ShardingSQLException {
     private static final long serialVersionUID = -5008645813201488531L;
     
     public ActualTableNotFoundException(final String dataSourceName, final String tableName) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 22, "Actual table `%s.%s` is not in table rule configuration", dataSourceName, tableName);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 4, "Actual table `%s.%s` is not in table rule configuration", dataSourceName, tableName);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/BindingTableNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/BindingTableNotFoundException.java
similarity index 87%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/BindingTableNotFoundException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/BindingTableNotFoundException.java
index f07c55818a1..bfddd2e2a11 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/BindingTableNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/BindingTableNotFoundException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.metadata;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Binding table not found exception.
@@ -27,7 +28,7 @@ public final class BindingTableNotFoundException extends ShardingSQLException {
     private static final long serialVersionUID = -8845309665057958820L;
     
     public BindingTableNotFoundException(final String dataSource, final String logicTable, final String otherActualTable) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 24,
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 5,
                 "Can not find binding actual table, data source is `%s`, logic table is `%s`, other actual table is `%s`", dataSource, logicTable, otherActualTable);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataNodeGenerateException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodeGenerateException.java
similarity index 81%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataNodeGenerateException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodeGenerateException.java
index 7d92f99decf..65365968c40 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataNodeGenerateException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodeGenerateException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.metadata;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Data node generate exception.
@@ -27,6 +28,6 @@ public final class DataNodeGenerateException extends ShardingSQLException {
     private static final long serialVersionUID = -1000865538051567910L;
     
     public DataNodeGenerateException(final String dataNode) {
-        super(XOpenSQLState.NOT_FOUND, 52, "Can not find data source in sharding rule, invalid actual data node `%s`", dataNode);
+        super(XOpenSQLState.NOT_FOUND, 2, "Can not find data source in sharding rule, invalid actual data node `%s`", dataNode);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualDataNodesMissedWithShardingTableException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodesMissedWithShardingTableException.java
similarity index 67%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualDataNodesMissedWithShardingTableException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodesMissedWithShardingTableException.java
index 568f8fd3271..f8f16062a15 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ActualDataNodesMissedWithShardingTableException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodesMissedWithShardingTableException.java
@@ -15,18 +15,19 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.metadata;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
- * Actual data nodes missed with sharding table exception.
+ * Data nodes missed with sharding table exception.
  */
-public final class ActualDataNodesMissedWithShardingTableException extends ShardingSQLException {
+public final class DataNodesMissedWithShardingTableException extends ShardingSQLException {
     
     private static final long serialVersionUID = 1691113459377955727L;
     
-    public ActualDataNodesMissedWithShardingTableException(final String tableName) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 21, "Actual data nodes must be configured for sharding table `%s`", tableName);
+    public DataNodesMissedWithShardingTableException(final String tableName) {
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 3, "Data nodes must be configured for sharding table `%s`", tableName);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DropInUsedTablesException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DropInUsedTablesException.java
similarity index 82%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DropInUsedTablesException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DropInUsedTablesException.java
index a19ce953121..481aa26c43d 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DropInUsedTablesException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DropInUsedTablesException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.metadata;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 import java.util.Collection;
 
@@ -29,6 +30,6 @@ public final class DropInUsedTablesException extends ShardingSQLException {
     private static final long serialVersionUID = 8939233348292246498L;
     
     public DropInUsedTablesException(final Collection<String> inUsedTables) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 32, "Actual tables `%s` are in use", inUsedTables.toString());
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 6, "Actual tables `%s` are in use", inUsedTables.toString());
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DuplicatedIndexException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicatedIndexException.java
similarity index 84%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DuplicatedIndexException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicatedIndexException.java
index 9dc8c9882b0..93e03d674f1 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DuplicatedIndexException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicatedIndexException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.metadata;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Duplicated index exception.
@@ -27,6 +28,6 @@ public final class DuplicatedIndexException extends ShardingSQLException {
     private static final long serialVersionUID = 2884666477007627873L;
     
     public DuplicatedIndexException(final String indexName) {
-        super(XOpenSQLState.DUPLICATE, 30, "Index `%s` already exists", indexName);
+        super(XOpenSQLState.DUPLICATE, 7, "Index `%s` already exists", indexName);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EngagedViewException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/EngagedViewException.java
similarity index 83%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EngagedViewException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/EngagedViewException.java
index 8749d93ae32..8526d7efb54 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/EngagedViewException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/EngagedViewException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.metadata;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Engaged view exception.
@@ -27,6 +28,6 @@ public final class EngagedViewException extends ShardingSQLException {
     private static final long serialVersionUID = -8312969473716234951L;
     
     public EngagedViewException(final String shardingType) {
-        super(XOpenSQLState.DUPLICATE, 33, "View name has to bind to %s tables", shardingType);
+        super(XOpenSQLState.DUPLICATE, 9, "View name has to bind to %s tables", shardingType);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InconsistentShardingTableMetaDataException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InconsistentShardingTableMetaDataException.java
similarity index 93%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InconsistentShardingTableMetaDataException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InconsistentShardingTableMetaDataException.java
index 7991934db44..8d63c625b3a 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InconsistentShardingTableMetaDataException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InconsistentShardingTableMetaDataException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.metadata;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 import org.apache.shardingsphere.sharding.metadata.TableMetaDataViolation;
 
 import java.util.Collection;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/IndexNotExistedException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/IndexNotExistedException.java
similarity index 84%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/IndexNotExistedException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/IndexNotExistedException.java
index 5bcd60587b4..7992fac94a3 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/IndexNotExistedException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/IndexNotExistedException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.metadata;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Index not existed exception.
@@ -27,6 +28,6 @@ public final class IndexNotExistedException extends ShardingSQLException {
     private static final long serialVersionUID = 206503570677185269L;
     
     public IndexNotExistedException(final String indexName) {
-        super(XOpenSQLState.NOT_FOUND, 31, "Index `%s` does not exist", indexName);
+        super(XOpenSQLState.NOT_FOUND, 8, "Index `%s` does not exist", indexName);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRuleNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ShardingRuleNotFoundException.java
similarity index 86%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRuleNotFoundException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ShardingRuleNotFoundException.java
index 98d98115a18..795a540773b 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/ShardingRuleNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ShardingRuleNotFoundException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.metadata;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 import java.util.Collection;
 
@@ -29,6 +30,6 @@ public final class ShardingRuleNotFoundException extends ShardingSQLException {
     private static final long serialVersionUID = 142299282103233064L;
     
     public ShardingRuleNotFoundException(final Collection<String> logicTables) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 3, "Can not find table rule with logic tables `%s`", logicTables.toString());
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 0, "Can not find table rule with logic tables `%s`", logicTables.toString());
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLMultipleDataNodesWithLimitException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLMultipleDataNodesWithLimitException.java
similarity index 86%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLMultipleDataNodesWithLimitException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLMultipleDataNodesWithLimitException.java
index f01bfd5337a..86f89cc4e31 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLMultipleDataNodesWithLimitException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLMultipleDataNodesWithLimitException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.syntax;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * DML multiple data nodes with limit Exception.
@@ -27,6 +28,6 @@ public final class DMLMultipleDataNodesWithLimitException extends ShardingSQLExc
     private static final long serialVersionUID = -203240151021113065L;
     
     public DMLMultipleDataNodesWithLimitException(final String operation) {
-        super(XOpenSQLState.SYNTAX_ERROR, 16, "%s ... LIMIT can not support route to multiple data nodes", operation);
+        super(XOpenSQLState.SYNTAX_ERROR, 26, "%s ... LIMIT can not support route to multiple data nodes", operation);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLWithMultipleShardingTablesException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLWithMultipleShardingTablesException.java
similarity index 86%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLWithMultipleShardingTablesException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLWithMultipleShardingTablesException.java
index b317c6d228b..91901fe6d6d 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DMLWithMultipleShardingTablesException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLWithMultipleShardingTablesException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.syntax;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 import java.util.Collection;
 
@@ -29,6 +30,6 @@ public final class DMLWithMultipleShardingTablesException extends ShardingSQLExc
     private static final long serialVersionUID = -7368310216924145478L;
     
     public DMLWithMultipleShardingTablesException(final Collection<String> tableNames) {
-        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 14, "Can not support DML operation with multiple tables `%s`", tableNames.toString());
+        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 25, "Can not support DML operation with multiple tables `%s`", tableNames.toString());
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataSourceIntersectionNotFoundException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DataSourceIntersectionNotFoundException.java
similarity index 86%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataSourceIntersectionNotFoundException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DataSourceIntersectionNotFoundException.java
index 897093b2d84..929890e032d 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/DataSourceIntersectionNotFoundException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DataSourceIntersectionNotFoundException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.syntax;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 import java.util.Collection;
 
@@ -29,6 +30,6 @@ public final class DataSourceIntersectionNotFoundException extends ShardingSQLEx
     private static final long serialVersionUID = -2142571707728236489L;
     
     public DataSourceIntersectionNotFoundException(final Collection<String> logicTables) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 23, "Can not find actual data source intersection for logic tables `%s`", logicTables);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 27, "Can not find actual data source intersection for logic tables `%s`", logicTables);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InsertSelectTableViolationException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/InsertSelectTableViolationException.java
similarity index 86%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InsertSelectTableViolationException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/InsertSelectTableViolationException.java
index 53ea22f7496..e0d6a1efded 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/InsertSelectTableViolationException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/InsertSelectTableViolationException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.syntax;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Insert select table violation exception.
@@ -27,6 +28,6 @@ public final class InsertSelectTableViolationException extends ShardingSQLExcept
     private static final long serialVersionUID = 1221612068163533037L;
     
     public InsertSelectTableViolationException() {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 19, "The table inserted and the table selected must be the same or bind tables");
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 24, "The table inserted and the table selected must be the same or bind tables");
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MissingGenerateKeyColumnWithInsertSelectException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/MissingGenerateKeyColumnWithInsertSelectException.java
similarity index 86%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MissingGenerateKeyColumnWithInsertSelectException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/MissingGenerateKeyColumnWithInsertSelectException.java
index 0bc24fee231..e17c1084b66 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/MissingGenerateKeyColumnWithInsertSelectException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/MissingGenerateKeyColumnWithInsertSelectException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.syntax;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Missing generate key column with insert select exception.
@@ -27,6 +28,6 @@ public final class MissingGenerateKeyColumnWithInsertSelectException extends Sha
     private static final long serialVersionUID = 568269722599010228L;
     
     public MissingGenerateKeyColumnWithInsertSelectException() {
-        super(XOpenSQLState.SYNTAX_ERROR, 18, "INSERT INTO ... SELECT can not support applying key generator with absent generate key column");
+        super(XOpenSQLState.SYNTAX_ERROR, 28, "INSERT INTO ... SELECT can not support applying key generator with absent generate key column");
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/RenamedViewWithoutSameConfigException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/RenamedViewWithoutSameConfigurationException.java
similarity index 70%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/RenamedViewWithoutSameConfigException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/RenamedViewWithoutSameConfigurationException.java
index 9696c8a7e37..bef979b7f08 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/RenamedViewWithoutSameConfigException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/RenamedViewWithoutSameConfigurationException.java
@@ -15,18 +15,19 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.syntax;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
- * Unsupported rename view exception.
+ * Renamed view without same configuration exception.
  */
-public final class RenamedViewWithoutSameConfigException extends ShardingSQLException {
+public final class RenamedViewWithoutSameConfigurationException extends ShardingSQLException {
     
     private static final long serialVersionUID = -8276278970848162458L;
     
-    public RenamedViewWithoutSameConfigException(final String originView, final String targetView) {
-        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 34, "Alter view rename .. to .. statement should have same config for %s and %s", originView, targetView);
+    public RenamedViewWithoutSameConfigurationException(final String originView, final String targetView) {
+        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 29, "Alter view rename .. to .. statement should have same config for %s and %s", originView, targetView);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedCreateViewException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedCreateViewException.java
similarity index 85%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedCreateViewException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedCreateViewException.java
index 20b245ceb68..d9767f01179 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedCreateViewException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedCreateViewException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.syntax;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Unsupported create view exception.
@@ -27,6 +28,6 @@ public final class UnsupportedCreateViewException extends ShardingSQLException {
     private static final long serialVersionUID = -321126834428609310L;
     
     public UnsupportedCreateViewException() {
-        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 15, "The CREATE VIEW statement contains unsupported query statement");
+        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 22, "The CREATE VIEW statement contains unsupported query statement");
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedPrepareRouteToSameDataSourceException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedPrepareRouteToSameDataSourceException.java
similarity index 86%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedPrepareRouteToSameDataSourceException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedPrepareRouteToSameDataSourceException.java
index dd6e0c597b9..a5e5f520bf9 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedPrepareRouteToSameDataSourceException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedPrepareRouteToSameDataSourceException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.syntax;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Unsupported prepare route to same data source exception.
@@ -27,6 +28,6 @@ public final class UnsupportedPrepareRouteToSameDataSourceException extends Shar
     private static final long serialVersionUID = -451667286925533523L;
     
     public UnsupportedPrepareRouteToSameDataSourceException() {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 17, "PREPARE statement can not support sharding tables route to same data sources");
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 23, "PREPARE statement can not support sharding tables route to same data sources");
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedShardingOperationException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedShardingOperationException.java
similarity index 86%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedShardingOperationException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedShardingOperationException.java
index 220f6d9d0b9..91e8962d180 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedShardingOperationException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedShardingOperationException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.syntax;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Unsupported sharding operation exception.
@@ -27,6 +28,6 @@ public final class UnsupportedShardingOperationException extends ShardingSQLExce
     private static final long serialVersionUID = 1009938372927671322L;
     
     public UnsupportedShardingOperationException(final String operation, final String tableName) {
-        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 13, "Can not support operation `%s` with sharding table `%s`", operation, tableName);
+        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 20, "Can not support operation `%s` with sharding table `%s`", operation, tableName);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedUpdatingShardingValueException.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedUpdatingShardingValueException.java
similarity index 86%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedUpdatingShardingValueException.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedUpdatingShardingValueException.java
index 35dd81d4a08..f9c1bf5c5a1 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/UnsupportedUpdatingShardingValueException.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedUpdatingShardingValueException.java
@@ -15,9 +15,10 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception;
+package org.apache.shardingsphere.sharding.exception.syntax;
 
 import org.apache.shardingsphere.infra.util.exception.external.sql.sqlstate.XOpenSQLState;
+import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
  * Unsupported updating sharding value exception.
@@ -27,6 +28,6 @@ public final class UnsupportedUpdatingShardingValueException extends ShardingSQL
     private static final long serialVersionUID = 2552228890146113383L;
     
     public UnsupportedUpdatingShardingValueException(final String tableName) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 12, "Can not update sharding value for table `%s`", tableName);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 21, "Can not update sharding value for table `%s`", tableName);
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/merge/ddl/fetch/FetchStreamMergedResult.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/merge/ddl/fetch/FetchStreamMergedResult.java
index e62100bd76c..4c9db958ace 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/merge/ddl/fetch/FetchStreamMergedResult.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/merge/ddl/fetch/FetchStreamMergedResult.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.dr
 import org.apache.shardingsphere.infra.executor.sql.execute.result.query.impl.driver.jdbc.type.stream.JDBCStreamQueryResult;
 import org.apache.shardingsphere.infra.merge.result.impl.stream.StreamMergedResult;
 import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema;
-import org.apache.shardingsphere.sharding.exception.CursorNameNotFoundException;
+import org.apache.shardingsphere.sharding.exception.connection.CursorNameNotFoundException;
 import org.apache.shardingsphere.sharding.merge.dql.orderby.OrderByValue;
 import org.apache.shardingsphere.sql.parser.sql.common.constant.DirectionType;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.cursor.DirectionSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingSchemaMetaDataDecorator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingSchemaMetaDataDecorator.java
index 7740c6e7c83..bbe9538d20a 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingSchemaMetaDataDecorator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/metadata/ShardingSchemaMetaDataDecorator.java
@@ -27,7 +27,7 @@ import org.apache.shardingsphere.infra.metadata.database.schema.loader.model.Ind
 import org.apache.shardingsphere.infra.metadata.database.schema.loader.model.SchemaMetaData;
 import org.apache.shardingsphere.infra.metadata.database.schema.loader.model.TableMetaData;
 import org.apache.shardingsphere.sharding.constant.ShardingOrder;
-import org.apache.shardingsphere.sharding.exception.InconsistentShardingTableMetaDataException;
+import org.apache.shardingsphere.sharding.exception.metadata.InconsistentShardingTableMetaDataException;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sharding.rule.TableRule;
 
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/InsertClauseShardingConditionEngine.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/InsertClauseShardingConditionEngine.java
index 61e91e2903a..3518bf76345 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/InsertClauseShardingConditionEngine.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/InsertClauseShardingConditionEngine.java
@@ -27,7 +27,7 @@ import org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementConte
 import org.apache.shardingsphere.infra.datetime.DatetimeService;
 import org.apache.shardingsphere.infra.datetime.DatetimeServiceFactory;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
-import org.apache.shardingsphere.sharding.exception.NullShardingValueException;
+import org.apache.shardingsphere.sharding.exception.data.NullShardingValueException;
 import org.apache.shardingsphere.sharding.route.engine.condition.ExpressionConditionUtils;
 import org.apache.shardingsphere.sharding.route.engine.condition.ShardingCondition;
 import org.apache.shardingsphere.sharding.route.engine.condition.engine.ShardingConditionEngine;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/WhereClauseShardingConditionEngine.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/WhereClauseShardingConditionEngine.java
index a21e8c86466..7e6c33a03c7 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/WhereClauseShardingConditionEngine.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/condition/engine/impl/WhereClauseShardingConditionEngine.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.infra.binder.type.WhereAvailable;
 import org.apache.shardingsphere.infra.database.type.DatabaseTypeEngine;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema;
-import org.apache.shardingsphere.sharding.exception.ShardingValueDataTypeException;
+import org.apache.shardingsphere.sharding.exception.data.ShardingValueDataTypeException;
 import org.apache.shardingsphere.sharding.route.engine.condition.AlwaysFalseShardingCondition;
 import org.apache.shardingsphere.sharding.route.engine.condition.Column;
 import org.apache.shardingsphere.sharding.route.engine.condition.ShardingCondition;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngine.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngine.java
index 97080563964..a4adf1a13bb 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngine.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngine.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.sharding.route.engine.type.complex;
 import lombok.RequiredArgsConstructor;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.ShardingRuleNotFoundException;
+import org.apache.shardingsphere.sharding.exception.metadata.ShardingRuleNotFoundException;
 import org.apache.shardingsphere.sharding.route.engine.condition.ShardingConditions;
 import org.apache.shardingsphere.sharding.route.engine.type.ShardingRouteEngine;
 import org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngine.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngine.java
index 84eee206c1c..67fb6160b08 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngine.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngine.java
@@ -25,7 +25,7 @@ import org.apache.shardingsphere.infra.datanode.DataNode;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteMapper;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.sharding.exception.DataSourceIntersectionNotFoundException;
+import org.apache.shardingsphere.sharding.exception.syntax.DataSourceIntersectionNotFoundException;
 import org.apache.shardingsphere.sharding.route.engine.type.ShardingRouteEngine;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sharding.rule.TableRule;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java
index 017b12efa23..6cd07278ec2 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDDLStatementValidator.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.dialect.exception.syntax.table.NoSuchTableExcep
 import org.apache.shardingsphere.dialect.exception.syntax.table.TableExistsException;
 import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.UnsupportedShardingOperationException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedShardingOperationException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ShardingStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterIndexStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterIndexStatementValidator.java
index 655a54802a9..407831d9d84 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterIndexStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterIndexStatementValidator.java
@@ -23,8 +23,8 @@ import org.apache.shardingsphere.infra.database.type.DatabaseTypeEngine;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.DuplicatedIndexException;
-import org.apache.shardingsphere.sharding.exception.IndexNotExistedException;
+import org.apache.shardingsphere.sharding.exception.metadata.DuplicatedIndexException;
+import org.apache.shardingsphere.sharding.exception.metadata.IndexNotExistedException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.ShardingDDLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterTableStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterTableStatementValidator.java
index f73c1a42098..8fb542ed5a0 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterTableStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterTableStatementValidator.java
@@ -22,8 +22,8 @@ import org.apache.shardingsphere.infra.binder.type.TableAvailable;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.ShardingDDLRouteException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedShardingOperationException;
+import org.apache.shardingsphere.sharding.exception.connection.ShardingDDLRouteException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedShardingOperationException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.ShardingDDLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterViewStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterViewStatementValidator.java
index 6329ff9021e..7c35e4e9f95 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterViewStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterViewStatementValidator.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.RenamedViewWithoutSameConfigException;
+import org.apache.shardingsphere.sharding.exception.syntax.RenamedViewWithoutSameConfigurationException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.ShardingDDLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.extractor.TableExtractor;
@@ -58,11 +58,11 @@ public final class ShardingAlterViewStatementValidator extends ShardingDDLStatem
     
     private void validateBroadcastShardingView(final ShardingRule shardingRule, final String originView, final String targetView) {
         if (shardingRule.isBroadcastTable(originView) ^ shardingRule.isBroadcastTable(targetView)) {
-            throw new RenamedViewWithoutSameConfigException(originView, targetView);
+            throw new RenamedViewWithoutSameConfigurationException(originView, targetView);
         }
         if (shardingRule.isShardingTable(originView) || shardingRule.isShardingTable(targetView)) {
             if (!shardingRule.isAllBindingTables(Arrays.asList(originView, targetView))) {
-                throw new RenamedViewWithoutSameConfigException(originView, targetView);
+                throw new RenamedViewWithoutSameConfigurationException(originView, targetView);
             }
         }
     }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateIndexStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateIndexStatementValidator.java
index b6fcaff8ae0..f287e1118f4 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateIndexStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateIndexStatementValidator.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.infra.database.type.DatabaseTypeEngine;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.DuplicatedIndexException;
+import org.apache.shardingsphere.sharding.exception.metadata.DuplicatedIndexException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.ShardingDDLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateIndexStatement;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateTableStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateTableStatementValidator.java
index eb09c3068c1..eb025aeb8af 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateTableStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateTableStatementValidator.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.infra.database.type.DatabaseTypeEngine;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.ShardingDDLRouteException;
+import org.apache.shardingsphere.sharding.exception.connection.ShardingDDLRouteException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.ShardingDDLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateTableStatement;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateViewStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateViewStatementValidator.java
index 1c36adf0d71..3078506f10e 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateViewStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateViewStatementValidator.java
@@ -21,8 +21,8 @@ import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.EngagedViewException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedCreateViewException;
+import org.apache.shardingsphere.sharding.exception.metadata.EngagedViewException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedCreateViewException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.ShardingDDLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.extractor.TableExtractor;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropIndexStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropIndexStatementValidator.java
index 0ccafbf5ee3..34ad7f38249 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropIndexStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropIndexStatementValidator.java
@@ -23,8 +23,8 @@ import org.apache.shardingsphere.infra.database.type.DatabaseTypeEngine;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.IndexNotExistedException;
-import org.apache.shardingsphere.sharding.exception.ShardingDDLRouteException;
+import org.apache.shardingsphere.sharding.exception.metadata.IndexNotExistedException;
+import org.apache.shardingsphere.sharding.exception.connection.ShardingDDLRouteException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.ShardingDDLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropTableStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropTableStatementValidator.java
index 4fe88fd9f80..d4c484e70db 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropTableStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropTableStatementValidator.java
@@ -25,9 +25,9 @@ import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereSchema;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteMapper;
-import org.apache.shardingsphere.sharding.exception.DropInUsedTablesException;
-import org.apache.shardingsphere.sharding.exception.ShardingDDLRouteException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedShardingOperationException;
+import org.apache.shardingsphere.sharding.exception.metadata.DropInUsedTablesException;
+import org.apache.shardingsphere.sharding.exception.connection.ShardingDDLRouteException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedShardingOperationException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.ShardingDDLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingPrepareStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingPrepareStatementValidator.java
index 6b43229d36e..040ddd152c8 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingPrepareStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingPrepareStatementValidator.java
@@ -22,8 +22,8 @@ import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.sharding.exception.EmptyShardingRouteResultException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedPrepareRouteToSameDataSourceException;
+import org.apache.shardingsphere.sharding.exception.connection.EmptyShardingRouteResultException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedPrepareRouteToSameDataSourceException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.ShardingDDLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.PrepareStatement;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingRenameTableStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingRenameTableStatementValidator.java
index 20b38d814a3..a4ecc84214c 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingRenameTableStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingRenameTableStatementValidator.java
@@ -22,8 +22,8 @@ import org.apache.shardingsphere.infra.binder.type.TableAvailable;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.ShardingDDLRouteException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedShardingOperationException;
+import org.apache.shardingsphere.sharding.exception.connection.ShardingDDLRouteException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedShardingOperationException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.ShardingDDLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.table.RenameTableDefinitionSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingDMLStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingDMLStatementValidator.java
index 06b430e8464..ff53bf2f765 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingDMLStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingDMLStatementValidator.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteMapper;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.sharding.exception.DMLWithMultipleShardingTablesException;
+import org.apache.shardingsphere.sharding.exception.syntax.DMLWithMultipleShardingTablesException;
 import org.apache.shardingsphere.sharding.route.engine.condition.ShardingCondition;
 import org.apache.shardingsphere.sharding.route.engine.condition.ShardingConditions;
 import org.apache.shardingsphere.sharding.route.engine.condition.value.ListShardingConditionValue;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingCopyStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingCopyStatementValidator.java
index 75dd07d6bfe..827ba6b4634 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingCopyStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingCopyStatementValidator.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.UnsupportedShardingOperationException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedShardingOperationException;
 import org.apache.shardingsphere.sharding.route.engine.validator.dml.ShardingDMLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.dml.CopyStatement;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingDeleteStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingDeleteStatementValidator.java
index 621dbe9351a..6040337965e 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingDeleteStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingDeleteStatementValidator.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.DMLMultipleDataNodesWithLimitException;
+import org.apache.shardingsphere.sharding.exception.syntax.DMLMultipleDataNodesWithLimitException;
 import org.apache.shardingsphere.sharding.route.engine.validator.dml.ShardingDMLStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.dml.DeleteStatement;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java
index 5d16bbcc334..71fe43d2e38 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java
@@ -25,9 +25,9 @@ import org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementConte
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.InsertSelectTableViolationException;
-import org.apache.shardingsphere.sharding.exception.MissingGenerateKeyColumnWithInsertSelectException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedUpdatingShardingValueException;
+import org.apache.shardingsphere.sharding.exception.syntax.InsertSelectTableViolationException;
+import org.apache.shardingsphere.sharding.exception.syntax.MissingGenerateKeyColumnWithInsertSelectException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedUpdatingShardingValueException;
 import org.apache.shardingsphere.sharding.route.engine.condition.ShardingConditions;
 import org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine;
 import org.apache.shardingsphere.sharding.route.engine.validator.dml.ShardingDMLStatementValidator;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingUpdateStatementValidator.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingUpdateStatementValidator.java
index 89dc4c15d0b..ba99b5d7af9 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingUpdateStatementValidator.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingUpdateStatementValidator.java
@@ -21,8 +21,8 @@ import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.DMLMultipleDataNodesWithLimitException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedUpdatingShardingValueException;
+import org.apache.shardingsphere.sharding.exception.syntax.DMLMultipleDataNodesWithLimitException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedUpdatingShardingValueException;
 import org.apache.shardingsphere.sharding.route.engine.condition.ShardingConditions;
 import org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine;
 import org.apache.shardingsphere.sharding.route.engine.validator.dml.ShardingDMLStatementValidator;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java
index e9f4f3f30ff..e420f511fe8 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.infra.datanode.DataNodeInfo;
 import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
 import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
 import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
-import org.apache.shardingsphere.sharding.exception.ShardingRouteAlgorithmException;
+import org.apache.shardingsphere.sharding.exception.algorithm.ShardingRouteAlgorithmException;
 import org.apache.shardingsphere.sharding.route.engine.condition.value.ListShardingConditionValue;
 import org.apache.shardingsphere.sharding.route.engine.condition.value.RangeShardingConditionValue;
 import org.apache.shardingsphere.sharding.route.engine.condition.value.ShardingConditionValue;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/BindingTableRule.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/BindingTableRule.java
index 4c1710c29e3..1c9928e87bb 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/BindingTableRule.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/BindingTableRule.java
@@ -19,8 +19,8 @@ package org.apache.shardingsphere.sharding.rule;
 
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.sharding.exception.ActualTableNotFoundException;
-import org.apache.shardingsphere.sharding.exception.BindingTableNotFoundException;
+import org.apache.shardingsphere.sharding.exception.metadata.ActualTableNotFoundException;
+import org.apache.shardingsphere.sharding.exception.metadata.BindingTableNotFoundException;
 
 import java.util.Collection;
 import java.util.LinkedHashMap;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/ShardingRule.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/ShardingRule.java
index 3c247477da4..cec8239186e 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/ShardingRule.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/ShardingRule.java
@@ -45,8 +45,8 @@ import org.apache.shardingsphere.sharding.api.config.strategy.sharding.NoneShard
 import org.apache.shardingsphere.sharding.api.config.strategy.sharding.ShardingStrategyConfiguration;
 import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
 import org.apache.shardingsphere.sharding.api.sharding.ShardingAutoTableAlgorithm;
-import org.apache.shardingsphere.sharding.exception.GenerateKeyStrategyNotFoundException;
-import org.apache.shardingsphere.sharding.exception.ShardingRuleNotFoundException;
+import org.apache.shardingsphere.sharding.exception.algorithm.GenerateKeyStrategyNotFoundException;
+import org.apache.shardingsphere.sharding.exception.metadata.ShardingRuleNotFoundException;
 import org.apache.shardingsphere.sharding.factory.KeyGenerateAlgorithmFactory;
 import org.apache.shardingsphere.sharding.factory.ShardingAlgorithmFactory;
 import org.apache.shardingsphere.sharding.factory.ShardingAuditAlgorithmFactory;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/TableRule.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/TableRule.java
index cdc9778422c..5ea17ef4d1b 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/TableRule.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/rule/TableRule.java
@@ -33,8 +33,8 @@ import org.apache.shardingsphere.sharding.api.config.strategy.keygen.KeyGenerate
 import org.apache.shardingsphere.sharding.api.config.strategy.sharding.NoneShardingStrategyConfiguration;
 import org.apache.shardingsphere.sharding.api.config.strategy.sharding.ShardingStrategyConfiguration;
 import org.apache.shardingsphere.sharding.api.sharding.ShardingAutoTableAlgorithm;
-import org.apache.shardingsphere.sharding.exception.ActualDataNodesMissedWithShardingTableException;
-import org.apache.shardingsphere.sharding.exception.DataNodeGenerateException;
+import org.apache.shardingsphere.sharding.exception.metadata.DataNodesMissedWithShardingTableException;
+import org.apache.shardingsphere.sharding.exception.metadata.DataNodeGenerateException;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -243,7 +243,7 @@ public final class TableRule {
     
     private void checkRule(final List<String> dataNodes) {
         ShardingSpherePreconditions.checkState(!isEmptyDataNodes(dataNodes) || null == tableShardingStrategyConfig || tableShardingStrategyConfig instanceof NoneShardingStrategyConfiguration,
-                new ActualDataNodesMissedWithShardingTableException(logicTable));
+                new DataNodesMissedWithShardingTableException(logicTable));
     }
     
     /**
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java
index bbe53609a13..5ae7a296fd0 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java
@@ -18,7 +18,7 @@
 package org.apache.shardingsphere.sharding.algorithm.sharding.classbased;
 
 import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
-import org.apache.shardingsphere.sharding.exception.ShardingAlgorithmClassImplementationException;
+import org.apache.shardingsphere.sharding.exception.algorithm.ShardingAlgorithmClassImplementationException;
 import org.apache.shardingsphere.sharding.fixture.ClassBasedHintShardingAlgorithmFixture;
 import org.apache.shardingsphere.sharding.fixture.ClassBasedStandardShardingAlgorithmFixture;
 import org.junit.Test;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java
index 024157a3d67..ec143adfb2e 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.sharding.api.sharding.complex.ComplexKeysShardi
 import org.apache.shardingsphere.sharding.api.sharding.hint.HintShardingValue;
 import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
 import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
-import org.apache.shardingsphere.sharding.exception.ShardingAlgorithmClassImplementationException;
+import org.apache.shardingsphere.sharding.exception.algorithm.ShardingAlgorithmClassImplementationException;
 import org.apache.shardingsphere.sharding.factory.ShardingAlgorithmFactory;
 import org.apache.shardingsphere.sharding.fixture.ClassBasedComplexKeysShardingAlgorithmFixture;
 import org.apache.shardingsphere.sharding.fixture.ClassBasedHintShardingAlgorithmFixture;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java
index 94342b0fb24..7646bb1a223 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.infra.config.algorithm.AlgorithmConfiguration;
 import org.apache.shardingsphere.infra.datanode.DataNodeInfo;
 import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
 import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
-import org.apache.shardingsphere.sharding.exception.MismatchedInlineShardingAlgorithmExpressionAndColumnException;
+import org.apache.shardingsphere.sharding.exception.algorithm.MismatchedInlineShardingAlgorithmExpressionAndColumnException;
 import org.apache.shardingsphere.sharding.factory.ShardingAlgorithmFactory;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngineTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngineTest.java
index 3cfba7f8256..bb0fdea955a 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngineTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingComplexRoutingEngineTest.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.sharding.route.engine.type.complex;
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.sharding.exception.ShardingRuleNotFoundException;
+import org.apache.shardingsphere.sharding.exception.metadata.ShardingRuleNotFoundException;
 import org.apache.shardingsphere.sharding.route.engine.fixture.AbstractRoutingEngineTest;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.junit.Test;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java
index 54a0707ca3e..037f48ab637 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.hint.HintManager;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.sharding.exception.ShardingRouteAlgorithmException;
+import org.apache.shardingsphere.sharding.exception.algorithm.ShardingRouteAlgorithmException;
 import org.apache.shardingsphere.sharding.route.engine.condition.ShardingConditions;
 import org.apache.shardingsphere.sharding.route.engine.fixture.AbstractRoutingEngineTest;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngineTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngineTest.java
index 58372ed72e8..4f5224749f4 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngineTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/unicast/ShardingUnicastRoutingEngineTest.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.infra.instance.InstanceContext;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
 import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
-import org.apache.shardingsphere.sharding.exception.ShardingRuleNotFoundException;
+import org.apache.shardingsphere.sharding.exception.metadata.ShardingRuleNotFoundException;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterIndexStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterIndexStatementValidatorTest.java
index 540a759a800..5d6737ab28f 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterIndexStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterIndexStatementValidatorTest.java
@@ -21,8 +21,8 @@ import org.apache.shardingsphere.infra.binder.statement.ddl.AlterIndexStatementC
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereIndex;
 import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereTable;
-import org.apache.shardingsphere.sharding.exception.DuplicatedIndexException;
-import org.apache.shardingsphere.sharding.exception.IndexNotExistedException;
+import org.apache.shardingsphere.sharding.exception.metadata.DuplicatedIndexException;
+import org.apache.shardingsphere.sharding.exception.metadata.IndexNotExistedException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingAlterIndexStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexNameSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterTableStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterTableStatementValidatorTest.java
index 2139fd6ac9c..c2879728b22 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterTableStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterTableStatementValidatorTest.java
@@ -24,8 +24,8 @@ import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteMapper;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.sharding.exception.ShardingDDLRouteException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedShardingOperationException;
+import org.apache.shardingsphere.sharding.exception.connection.ShardingDDLRouteException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedShardingOperationException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingAlterTableStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sharding.rule.TableRule;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterViewStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterViewStatementValidatorTest.java
index 951db403d74..1786d40ae7c 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterViewStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterViewStatementValidatorTest.java
@@ -20,8 +20,8 @@ package org.apache.shardingsphere.sharding.route.engine.validator.ddl;
 import org.apache.shardingsphere.infra.binder.statement.CommonSQLStatementContext;
 import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
-import org.apache.shardingsphere.sharding.exception.RenamedViewWithoutSameConfigException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedShardingOperationException;
+import org.apache.shardingsphere.sharding.exception.syntax.RenamedViewWithoutSameConfigurationException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedShardingOperationException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingAlterViewStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
@@ -83,7 +83,7 @@ public final class ShardingAlterViewStatementValidatorTest {
         new ShardingAlterViewStatementValidator().preValidate(shardingRule, sqlStatementContext, Collections.emptyList(), database);
     }
     
-    @Test(expected = RenamedViewWithoutSameConfigException.class)
+    @Test(expected = RenamedViewWithoutSameConfigurationException.class)
     public void assertPreValidateAlterRenamedViewWithoutSameConfig() {
         OpenGaussAlterViewStatement selectStatement = new OpenGaussAlterViewStatement();
         selectStatement.setView(new SimpleTableSegment(new TableNameSegment(0, 0, new IdentifierValue("t_order"))));
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java
index 177917d0d1e..1d30816e662 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.dialect.exception.syntax.table.NoSuchTableExcep
 import org.apache.shardingsphere.infra.binder.statement.ddl.CreateIndexStatementContext;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.ShardingSphereTable;
-import org.apache.shardingsphere.sharding.exception.DuplicatedIndexException;
+import org.apache.shardingsphere.sharding.exception.metadata.DuplicatedIndexException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingCreateIndexStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.index.IndexNameSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java
index 4df2cdd1773..30a0e505bd5 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateTableStatementValidatorTest.java
@@ -25,7 +25,7 @@ import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteMapper;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.sharding.exception.ShardingDDLRouteException;
+import org.apache.shardingsphere.sharding.exception.connection.ShardingDDLRouteException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingCreateTableStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sharding.rule.TableRule;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateViewStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateViewStatementValidatorTest.java
index 780551c3217..af4b6681542 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateViewStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateViewStatementValidatorTest.java
@@ -21,8 +21,8 @@ import org.apache.shardingsphere.infra.binder.statement.ddl.CreateViewStatementC
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import org.apache.shardingsphere.sharding.exception.EngagedViewException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedCreateViewException;
+import org.apache.shardingsphere.sharding.exception.metadata.EngagedViewException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedCreateViewException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingCreateViewStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.item.ProjectionsSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropIndexStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropIndexStatementValidatorTest.java
index 639d21f9e92..331b48ab9ff 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropIndexStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropIndexStatementValidatorTest.java
@@ -25,8 +25,8 @@ import org.apache.shardingsphere.infra.metadata.database.schema.decorator.model.
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteMapper;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.sharding.exception.IndexNotExistedException;
-import org.apache.shardingsphere.sharding.exception.ShardingDDLRouteException;
+import org.apache.shardingsphere.sharding.exception.metadata.IndexNotExistedException;
+import org.apache.shardingsphere.sharding.exception.connection.ShardingDDLRouteException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingDropIndexStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sharding.rule.TableRule;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java
index 3a4dc426238..7bc33755c74 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java
@@ -26,8 +26,8 @@ import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteMapper;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.sharding.exception.DropInUsedTablesException;
-import org.apache.shardingsphere.sharding.exception.ShardingDDLRouteException;
+import org.apache.shardingsphere.sharding.exception.metadata.DropInUsedTablesException;
+import org.apache.shardingsphere.sharding.exception.connection.ShardingDDLRouteException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingDropTableStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sharding.rule.TableRule;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingPrepareStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingPrepareStatementValidatorTest.java
index ea386f787de..bb945374fd6 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingPrepareStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingPrepareStatementValidatorTest.java
@@ -23,8 +23,8 @@ import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteMapper;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.sharding.exception.EmptyShardingRouteResultException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedPrepareRouteToSameDataSourceException;
+import org.apache.shardingsphere.sharding.exception.connection.EmptyShardingRouteResultException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedPrepareRouteToSameDataSourceException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingPrepareStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.PrepareStatement;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingRenameTableStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingRenameTableStatementValidatorTest.java
index c668f1ff0a8..dd73258ff53 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingRenameTableStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingRenameTableStatementValidatorTest.java
@@ -24,8 +24,8 @@ import org.apache.shardingsphere.infra.datanode.DataNode;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import org.apache.shardingsphere.sharding.exception.ShardingDDLRouteException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedShardingOperationException;
+import org.apache.shardingsphere.sharding.exception.connection.ShardingDDLRouteException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedShardingOperationException;
 import org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingRenameTableStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sharding.rule.TableRule;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingCopyStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingCopyStatementValidatorTest.java
index a32448b8483..5e141594080 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingCopyStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingCopyStatementValidatorTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.sharding.route.engine.validator.dml;
 
 import org.apache.shardingsphere.infra.binder.statement.dml.CopyStatementContext;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
-import org.apache.shardingsphere.sharding.exception.UnsupportedShardingOperationException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedShardingOperationException;
 import org.apache.shardingsphere.sharding.route.engine.validator.dml.impl.ShardingCopyStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingDeleteStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingDeleteStatementValidatorTest.java
index c36acea92d3..1d24e152e77 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingDeleteStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingDeleteStatementValidatorTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.sharding.route.engine.validator.dml;
 
 import org.apache.shardingsphere.infra.binder.statement.dml.DeleteStatementContext;
 import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
-import org.apache.shardingsphere.sharding.exception.DMLWithMultipleShardingTablesException;
+import org.apache.shardingsphere.sharding.exception.syntax.DMLWithMultipleShardingTablesException;
 import org.apache.shardingsphere.sharding.route.engine.validator.dml.impl.ShardingDeleteStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.DeleteMultiTableSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java
index 2dc9f3852ad..58f99afbd1c 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java
@@ -31,10 +31,10 @@ import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteMapper;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
 import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-import org.apache.shardingsphere.sharding.exception.DMLWithMultipleShardingTablesException;
-import org.apache.shardingsphere.sharding.exception.InsertSelectTableViolationException;
-import org.apache.shardingsphere.sharding.exception.MissingGenerateKeyColumnWithInsertSelectException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedUpdatingShardingValueException;
+import org.apache.shardingsphere.sharding.exception.syntax.DMLWithMultipleShardingTablesException;
+import org.apache.shardingsphere.sharding.exception.syntax.InsertSelectTableViolationException;
+import org.apache.shardingsphere.sharding.exception.syntax.MissingGenerateKeyColumnWithInsertSelectException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedUpdatingShardingValueException;
 import org.apache.shardingsphere.sharding.factory.ShardingAlgorithmFactory;
 import org.apache.shardingsphere.sharding.route.engine.condition.ShardingConditions;
 import org.apache.shardingsphere.sharding.route.engine.validator.dml.impl.ShardingInsertStatementValidator;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingUpdateStatementValidatorTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingUpdateStatementValidatorTest.java
index 036ff3811c2..835256f1cdc 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingUpdateStatementValidatorTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingUpdateStatementValidatorTest.java
@@ -26,8 +26,8 @@ import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteMapper;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
 import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-import org.apache.shardingsphere.sharding.exception.DMLWithMultipleShardingTablesException;
-import org.apache.shardingsphere.sharding.exception.UnsupportedUpdatingShardingValueException;
+import org.apache.shardingsphere.sharding.exception.syntax.DMLWithMultipleShardingTablesException;
+import org.apache.shardingsphere.sharding.exception.syntax.UnsupportedUpdatingShardingValueException;
 import org.apache.shardingsphere.sharding.factory.ShardingAlgorithmFactory;
 import org.apache.shardingsphere.sharding.route.engine.validator.dml.impl.ShardingUpdateStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/BindingTableRuleTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/BindingTableRuleTest.java
index 58533cdc46d..b2b6aefcafa 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/BindingTableRuleTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/BindingTableRuleTest.java
@@ -18,8 +18,8 @@
 package org.apache.shardingsphere.sharding.rule;
 
 import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
-import org.apache.shardingsphere.sharding.exception.ActualTableNotFoundException;
-import org.apache.shardingsphere.sharding.exception.BindingTableNotFoundException;
+import org.apache.shardingsphere.sharding.exception.metadata.ActualTableNotFoundException;
+import org.apache.shardingsphere.sharding.exception.metadata.BindingTableNotFoundException;
 import org.junit.Test;
 
 import java.util.ArrayList;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
index 6eb65411438..7462da07a38 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
@@ -41,8 +41,8 @@ import org.apache.shardingsphere.sharding.api.config.strategy.sharding.ComplexSh
 import org.apache.shardingsphere.sharding.api.config.strategy.sharding.NoneShardingStrategyConfiguration;
 import org.apache.shardingsphere.sharding.api.config.strategy.sharding.ShardingStrategyConfiguration;
 import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-import org.apache.shardingsphere.sharding.exception.GenerateKeyStrategyNotFoundException;
-import org.apache.shardingsphere.sharding.exception.ShardingRuleNotFoundException;
+import org.apache.shardingsphere.sharding.exception.algorithm.GenerateKeyStrategyNotFoundException;
+import org.apache.shardingsphere.sharding.exception.metadata.ShardingRuleNotFoundException;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.column.ColumnSegment;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.BinaryOperationExpression;
 import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.ExpressionSegment;
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/TableRuleTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/TableRuleTest.java
index 4065570aefb..990773f762a 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/TableRuleTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/TableRuleTest.java
@@ -26,7 +26,7 @@ import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfi
 import org.apache.shardingsphere.sharding.api.config.strategy.keygen.KeyGenerateStrategyConfiguration;
 import org.apache.shardingsphere.sharding.api.config.strategy.sharding.NoneShardingStrategyConfiguration;
 import org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-import org.apache.shardingsphere.sharding.exception.ActualDataNodesMissedWithShardingTableException;
+import org.apache.shardingsphere.sharding.exception.metadata.DataNodesMissedWithShardingTableException;
 import org.apache.shardingsphere.sharding.factory.ShardingAlgorithmFactory;
 import org.junit.Test;
 
@@ -148,7 +148,7 @@ public final class TableRuleTest {
         assertFalse(actual.isExisted("table_3"));
     }
     
-    @Test(expected = ActualDataNodesMissedWithShardingTableException.class)
+    @Test(expected = DataNodesMissedWithShardingTableException.class)
     public void assertActualDataNodesNotConfigured() {
         ShardingTableRuleConfiguration shardingTableRuleConfig = new ShardingTableRuleConfiguration("LOGIC_TABLE", "");
         shardingTableRuleConfig.setTableShardingStrategy(new StandardShardingStrategyConfiguration("shardingColumn", "INLINE"));
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/checker/ShardingTableRuleStatementChecker.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/checker/ShardingTableRuleStatementChecker.java
index 72f11203c3c..592b100e92d 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/checker/ShardingTableRuleStatementChecker.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/checker/ShardingTableRuleStatementChecker.java
@@ -48,7 +48,7 @@ import org.apache.shardingsphere.sharding.distsql.parser.segment.AbstractTableRu
 import org.apache.shardingsphere.sharding.distsql.parser.segment.AutoTableRuleSegment;
 import org.apache.shardingsphere.sharding.distsql.parser.segment.ShardingStrategySegment;
 import org.apache.shardingsphere.sharding.distsql.parser.segment.TableRuleSegment;
-import org.apache.shardingsphere.sharding.exception.ShardingRuleNotFoundException;
+import org.apache.shardingsphere.sharding.exception.metadata.ShardingRuleNotFoundException;
 import org.apache.shardingsphere.sharding.factory.KeyGenerateAlgorithmFactory;
 import org.apache.shardingsphere.sharding.factory.ShardingAlgorithmFactory;
 import org.apache.shardingsphere.sharding.rule.BindingTableCheckedConfiguration;