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

sunnianjun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 131c465166b Refactor ShardingSQLException's impl (#30851)
131c465166b is described below

commit 131c465166b5a413ad7e16e05af1e93676ea8023
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Apr 11 20:17:39 2024 +0800

    Refactor ShardingSQLException's impl (#30851)
    
    * Refactor ShardingSQLException's impl
    
    * Refactor ShardingSQLException's impl
    
    * Refactor ShardingSQLException's impl
    
    * Refactor ShardingSQLException's impl
    
    * Refactor ShardingSQLException's impl
    
    * Refactor ShardingSQLException's impl
    
    * Refactor ShardingSQLException's impl
---
 .../user-manual/error-code/sql-error-code.cn.md    | 87 +++++++++++-----------
 .../user-manual/error-code/sql-error-code.en.md    | 87 +++++++++++-----------
 .../ClassBasedShardingAlgorithmFactory.java        |  2 +-
 .../inline/ComplexInlineShardingAlgorithm.java     |  2 +-
 .../sharding/inline/InlineShardingAlgorithm.java   |  2 +-
 .../DuplicateInsertDataRecordException.java        |  4 +-
 ...ardingAlgorithmColumnAndValueSizeException.java |  4 +-
 ...rdingAlgorithmExpressionAndColumnException.java |  4 +-
 ...atchedShardingDataSourceRouteInfoException.java |  4 +-
 .../NoShardingDatabaseRouteInfoException.java      |  4 +-
 .../NoShardingTableRouteFactorException.java       |  4 +-
 ...rdingAlgorithmClassImplementationException.java |  4 +-
 .../ShardingRouteAlgorithmException.java           |  4 +-
 .../connection/CursorNameNotFoundException.java    |  2 +-
 .../EmptyShardingRouteResultException.java         |  2 +-
 .../connection/ShardingDDLRouteException.java      |  2 +-
 .../data/InvalidDatetimeFormatException.java       |  2 +-
 .../data/NotImplementComparableValueException.java |  2 +-
 .../exception/data/NullShardingValueException.java |  2 +-
 .../data/ShardingValueDataTypeException.java       |  2 +-
 .../metadata/ActualTableNotFoundException.java     |  2 +-
 .../metadata/BindingTableNotFoundException.java    |  4 +-
 .../metadata/DataNodeGenerateException.java        |  2 +-
 ...Exception.java => DuplicateIndexException.java} |  8 +-
 .../DuplicateSharingActualDataNodeException.java   |  4 +-
 ...esException.java => InUsedTablesException.java} |  8 +-
 ...InconsistentShardingTableMetaDataException.java |  4 +-
 .../metadata/IndexNotExistedException.java         |  2 +-
 .../metadata/InvalidBindingTablesException.java    |  2 +-
 ...java => MissingRequiredDataNodesException.java} |  8 +-
 ...singRequiredShardingConfigurationException.java |  4 +-
 .../metadata/ShardingRuleNotFoundException.java    | 33 --------
 .../ShardingTableRuleNotFoundException.java        |  2 +-
 ...alidShardingStrategyConfigurationException.java |  4 +-
 .../DMLMultipleDataNodesWithLimitException.java    |  2 +-
 .../DMLWithMultipleShardingTablesException.java    |  2 +-
 .../DataSourceIntersectionNotFoundException.java   |  2 +-
 .../InsertSelectTableViolationException.java       |  2 +-
 ...GenerateKeyColumnWithInsertSelectException.java |  2 +-
 ...namedViewWithoutSameConfigurationException.java |  2 +-
 .../syntax/UnsupportedCreateViewException.java     |  2 +-
 ...ortedPrepareRouteToSameDataSourceException.java |  2 +-
 .../UnsupportedShardingOperationException.java     |  2 +-
 .../UnsupportedUpdatingShardingValueException.java |  2 +-
 .../complex/ShardingCartesianRoutingEngine.java    |  2 +-
 .../standard/ShardingStandardRoutingEngine.java    |  4 +-
 .../impl/ShardingAlterIndexStatementValidator.java |  4 +-
 .../ShardingCreateIndexStatementValidator.java     |  4 +-
 .../impl/ShardingDropTableStatementValidator.java  |  4 +-
 .../dml/impl/ShardingInsertStatementValidator.java |  2 +-
 .../type/standard/StandardShardingStrategy.java    |  2 +-
 .../sharding/rule/ShardingTable.java               |  4 +-
 .../ClassBasedShardingAlgorithmFactoryTest.java    |  2 +-
 .../ClassBasedShardingAlgorithmTest.java           |  2 +-
 .../inline/InlineShardingAlgorithmTest.java        |  2 +-
 .../ShardingStandardRoutingEngineTest.java         |  2 +-
 .../ShardingAlterIndexStatementValidatorTest.java  |  4 +-
 .../ShardingCreateIndexStatementValidatorTest.java |  6 +-
 .../ShardingDropTableStatementValidatorTest.java   |  4 +-
 .../dml/ShardingInsertStatementValidatorTest.java  |  2 +-
 .../sharding/rule/ShardingTableTest.java           |  4 +-
 .../checker/ShardingTableRuleStatementChecker.java |  6 +-
 .../query/ShowShardingTableNodesExecutorTest.java  |  8 +-
 63 files changed, 185 insertions(+), 216 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 e9b0ed33ee3..4226fccd2a0 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
@@ -137,49 +137,50 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,
 
 ### 数据分片
 
-| Vendor Code | SQL State | 错误信息                                               
                                                                              |
-|-------------|-----------|----------------------------------------------------------------------------------------------------------------------------------|
-| 20000       | 44000     | Can not find table rule with logic tables \`%s\`.  
                                                                              |
-| 20001       | 44000     | Can not get uniformed table structure for logic 
table \`%s\`, it has different meta data of actual tables are as follows: %s    
 |
-| 20002       | 42S02     | Can not find data source in sharding rule, invalid 
actual data node \`%s\`.                                                      |
-| 20003       | 44000     | Data nodes must be configured for sharding table 
\`%s\`.                                                                         
|
-| 20004       | 44000     | Actual table \`%s.%s\` is not in table rule 
configuration.                                                                  
     |
-| 20005       | 44000     | Can not find binding actual table, data source is 
\`%s\`, logic table is \`%s\`, other actual table is \`%s\`.                   |
-| 20006       | 44000     | Actual tables \`%s\` are in use.                   
                                                                              |
-| 20007       | 42S01     | Index \`%s\` already exists.                       
                                                                              |
-| 20008       | 42S02     | Index \`%s\` does not exist.                       
                                                                              |
-| 20009       | 42S01     | View name has to bind to %s tables.                
                                                                              |
-| 20011       | 44000     | \`%s\` configuration does not exist in database 
\`%s\`.                                                                         
 |
-| 20012       | 44000     | Invalid binding table configuration in 
ShardingRuleConfiguration.                                                      
          |
-| 20013       | 44000     | Can not find sharding rule.                        
                                                                              |
-| 20014       | 44000     | Only allowed 0 or 1 sharding strategy 
configuration.                                                                  
           |
-| 20020       | 44000     | Sharding value can't be null in sql statement.     
                                                                              |
-| 20021       | HY004     | Found different types for sharding value \`%s\`.   
                                                                              |
-| 20022       | HY004     | Invalid %s, datetime pattern should be \`%s\`, 
value is \`%s\`.                                                                
  |
-| 20023       | 44000     | Sharding value %s subtract stop offset %d can not 
be less than start offset %d.                                                  |
-| 20024       | 44000     | %s value \`%s\` must implements Comparable.        
                                                                              |
-| 20040       | 0A000     | Can not support operation \`%s\` with sharding 
table \`%s\`.                                                                   
  |
-| 20041       | 44000     | Can not update sharding value for table \`%s\`.    
                                                                              |
-| 20042       | 0A000     | The CREATE VIEW statement contains unsupported 
query statement.                                                                
  |
-| 20043       | 44000     | PREPARE statement can not support sharding tables 
route to same data sources.                                                    |
-| 20044       | 44000     | The table inserted and the table selected must be 
the same or bind tables.                                                       |
-| 20045       | 0A000     | Can not support DML operation with multiple tables 
\`%s\`.                                                                       |
-| 20046       | 42000     | %s ... LIMIT can not support route to multiple 
data nodes.                                                                     
  |
-| 20047       | 44000     | Can not find actual data source intersection for 
logic tables \`%s\`.                                                            
|
-| 20048       | 42000     | INSERT INTO ... SELECT can not support applying 
key generator with absent generate key column.                                  
 |
-| 20049       | 0A000     | Alter view rename .. to .. statement should have 
same config for \`%s\` and \`%s\`.                                              
|
-| 20060       | HY000     | \`%s %s\` can not route correctly for %s \`%s\`.   
                                                                              |
-| 20061       | 42S02     | Can not get route result, please check your 
sharding rule configuration.                                                    
     |
-| 20062       | 34000     | Can not get cursor name from fetch statement.      
                                                                              |
-| 20080       | HY000     | Sharding algorithm class \`%s\` should be 
implement \`%s\`.                                                               
       |
-| 20081       | HY000     | Routed target \`%s\` does not exist, available 
targets are \`%s\`.                                                             
  |
-| 20082       | 44000     | Inline sharding algorithms expression \`%s\` and 
sharding column \`%s\` do not match.                                            
|
-| 20084       | 44000     | Complex inline algorithm need %d sharing columns, 
but only found %d.                                                             |
-| 20085       | 44000     | No sharding database route info.                   
                                                                              |
-| 20086       | 44000     | Some routed data sources do not belong to 
configured data sources. routed data sources: \`%s\`, configured data sources: 
\`%s\`. |
-| 20087       | 44000     | Please check your sharding conditions \`%s\` to 
avoid same record in table \`%s\` routing to multiple data nodes.               
 |
-| 20088       | 44000     | Cannot found routing table factor, data source: 
%s, actual table: %s.                                                           
 |
-| 20090       | 42000     | Not allow DML operation without sharding 
conditions.                                                                     
        |
+| Vendor Code | SQL State | 错误信息                                               
                                                                                
 |
+|-------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------|
+| 20000       | 44000     | Can not get uniformed table structure for logic 
table '%s', it has different meta data of actual tables are as follows: %s      
    |
+| 20001       | 42S02     | Can not find table rule with logic tables '%s'.    
                                                                                
 |
+| 20002       | 42S02     | Can not find data source in sharding rule, invalid 
actual data node '%s'.                                                          
 |
+| 20003       | 42S02     | Data nodes is required for sharding table '%s'.    
                                                                                
 |
+| 20004       | 42S02     | Actual table '%s.%s' is not in table rule 
configuration.                                                                  
          |
+| 20005       | 42S02     | Can not find binding actual table, data source is 
'%s', logic table is '%s', other actual table is '%s'.                          
  |
+| 20006       | 44000     | Actual tables '%s' are in use.                     
                                                                                
 |
+| 20007       | 42S01     | Index '%s' already exists.                         
                                                                                
 |
+| 20008       | 42S02     | Index '%s' does not exist.                         
                                                                                
 |
+| 20009       | 42S01     | View name has to bind to %s tables.                
                                                                                
 |
+| 20010       | 42S02     | %s configuration does not exist in database '%s'.  
                                                                                
 |
+| 20011       | 44000     | Invalid binding table configuration.               
                                                                                
 |
+| 20012       | 44000     | Only allowed 0 or 1 sharding strategy 
configuration.                                                                  
              |
+| 20013       | 42S01     | Same actual data node cannot be configured in 
multiple logic tables in same database, logical table '%s', actual data node 
'%s.%s'. |
+| 20020       | 44000     | Sharding value can not be null in SQL statement.   
                                                                                
 |
+| 20021       | HY004     | Found different types for sharding value '%s'.     
                                                                                
 |
+| 20022       | HY004     | Invalid %s, datetime pattern should be '%s', value 
is '%s'.                                                                        
 |
+| 20023       | 44000     | Sharding value %s subtract stop offset %d can not 
be less than start offset %d.                                                   
  |
+| 20024       | 44000     | %s value '%s' must implements Comparable.          
                                                                                
 |
+| 20030       | 0A000     | Can not support operation '%s' with sharding table 
'%s'.                                                                           
 |
+| 20031       | 44000     | Can not update sharding value for table '%s'.      
                                                                                
 |
+| 20032       | 0A000     | The CREATE VIEW statement contains unsupported 
query statement.                                                                
     |
+| 20033       | 44000     | PREPARE statement can not support sharding tables 
route to same data sources.                                                     
  |
+| 20034       | 44000     | The table inserted and the table selected must be 
the same or bind tables.                                                        
  |
+| 20035       | 0A000     | Can not support DML operation with multiple tables 
'%s'.                                                                           
 |
+| 20036       | 42000     | %s ... LIMIT can not support route to multiple 
data nodes.                                                                     
     |
+| 20037       | 44000     | Can not find actual data source intersection for 
logic tables '%s'.                                                              
   |
+| 20038       | 42000     | INSERT INTO ... SELECT can not support applying 
key generator with absent generate key column.                                  
    |
+| 20039       | 0A000     | Alter view rename .. to .. statement should have 
same config for '%s' and '%s'.                                                  
   |
+| 20040       | HY000     | '%s %s' can not route correctly for %s '%s'.       
                                                                                
 |
+| 20041       | 42S02     | Can not get route result, please check your 
sharding rule configuration.                                                    
        |
+| 20042       | 34000     | Can not get cursor name from fetch statement.      
                                                                                
 |
+| 20050       | HY000     | Sharding algorithm class '%s' should be implement 
'%s'.                                                                           
  |
+| 20051       | HY000     | Routed target '%s' does not exist, available 
targets are '%s'.                                                               
       |
+| 20052       | 44000     | Inline sharding algorithms expression '%s' and 
sharding column '%s' do not match.                                              
     |
+| 20053       | 44000     | Complex inline algorithm need %d sharing columns, 
but only found %d.                                                              
  |
+| 20054       | 44000     | No sharding database route info.                   
                                                                                
 |
+| 20055       | 44000     | Some routed data sources do not belong to 
configured data sources. routed data sources '%s', configured data sources 
'%s'.          |
+| 20056       | 44000     | Please check your sharding conditions '%s' to 
avoid same record in table '%s' routing to multiple data nodes.                 
      |
+| 20057       | 44000     | Can not find routing table factor, data source 
'%s', actual table '%s'.                                                        
     |
+| 20060       | HY000     | Invalid %s strategy '%s', strategy does not match 
data nodes.                                                                     
  |
+| 20090       | 42000     | Not allow DML operation without sharding 
conditions.                                                                     
           |
 
 ### 联邦查询
 
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 71a446f9560..ed6bb64eb86 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
@@ -138,49 +138,50 @@ SQL error codes provide by standard `SQL State`, `Vendor 
Code` and `Reason`, whi
 
 ### Data Sharding
 
-| Vendor Code | SQL State | Reason                                             
                                                                              |
-|-------------|-----------|----------------------------------------------------------------------------------------------------------------------------------|
-| 20000       | 44000     | Can not find table rule with logic tables \`%s\`.  
                                                                              |
-| 20001       | 44000     | Can not get uniformed table structure for logic 
table \`%s\`, it has different meta data of actual tables are as follows: %s    
 |
-| 20002       | 42S02     | Can not find data source in sharding rule, invalid 
actual data node \`%s\`.                                                      |
-| 20003       | 44000     | Data nodes must be configured for sharding table 
\`%s\`.                                                                         
|
-| 20004       | 44000     | Actual table \`%s.%s\` is not in table rule 
configuration.                                                                  
     |
-| 20005       | 44000     | Can not find binding actual table, data source is 
\`%s\`, logic table is \`%s\`, other actual table is \`%s\`.                   |
-| 20006       | 44000     | Actual tables \`%s\` are in use.                   
                                                                              |
-| 20007       | 42S01     | Index \`%s\` already exists.                       
                                                                              |
-| 20008       | 42S02     | Index \`%s\` does not exist.                       
                                                                              |
-| 20009       | 42S01     | View name has to bind to %s tables.                
                                                                              |
-| 20011       | 44000     | \`%s\` configuration does not exist in database 
\`%s\`.                                                                         
 |
-| 20012       | 44000     | Invalid binding table configuration in 
ShardingRuleConfiguration.                                                      
          |
-| 20013       | 44000     | Can not find sharding rule.                        
                                                                              |
-| 20014       | 44000     | Only allowed 0 or 1 sharding strategy 
configuration.                                                                  
           |
-| 20020       | 44000     | Sharding value can't be null in sql statement.     
                                                                              |
-| 20021       | HY004     | Found different types for sharding value \`%s\`.   
                                                                              |
-| 20022       | HY004     | Invalid %s, datetime pattern should be \`%s\`, 
value is \`%s\`.                                                                
  |
-| 20023       | 44000     | Sharding value %s subtract stop offset %d can not 
be less than start offset %d.                                                  |
-| 20024       | 44000     | %s value \`%s\` must implements Comparable.        
                                                                              |
-| 20040       | 0A000     | Can not support operation \`%s\` with sharding 
table \`%s\`.                                                                   
  |
-| 20041       | 44000     | Can not update sharding value for table \`%s\`.    
                                                                              |
-| 20042       | 0A000     | The CREATE VIEW statement contains unsupported 
query statement.                                                                
  |
-| 20043       | 44000     | PREPARE statement can not support sharding tables 
route to same data sources.                                                    |
-| 20044       | 44000     | The table inserted and the table selected must be 
the same or bind tables.                                                       |
-| 20045       | 0A000     | Can not support DML operation with multiple tables 
\`%s\`.                                                                       |
-| 20046       | 42000     | %s ... LIMIT can not support route to multiple 
data nodes.                                                                     
  |
-| 20047       | 44000     | Can not find actual data source intersection for 
logic tables \`%s\`.                                                            
|
-| 20048       | 42000     | INSERT INTO ... SELECT can not support applying 
key generator with absent generate key column.                                  
 |
-| 20049       | 0A000     | Alter view rename .. to .. statement should have 
same config for \`%s\` and \`%s\`.                                              
|
-| 20060       | HY000     | \`%s %s\` can not route correctly for %s \`%s\`.   
                                                                              |
-| 20061       | 42S02     | Can not get route result, please check your 
sharding rule configuration.                                                    
     |
-| 20062       | 34000     | Can not get cursor name from fetch statement.      
                                                                              |
-| 20080       | HY000     | Sharding algorithm class \`%s\` should be 
implement \`%s\`.                                                               
       |
-| 20081       | HY000     | Routed target \`%s\` does not exist, available 
targets are \`%s\`.                                                             
  |
-| 20082       | 44000     | Inline sharding algorithms expression \`%s\` and 
sharding column \`%s\` do not match.                                            
|
-| 20084       | 44000     | Complex inline algorithm need %d sharing columns, 
but only found %d.                                                             |
-| 20085       | 44000     | No sharding database route info.                   
                                                                              |
-| 20086       | 44000     | Some routed data sources do not belong to 
configured data sources. routed data sources: \`%s\`, configured data sources: 
\`%s\`. |
-| 20087       | 44000     | Please check your sharding conditions \`%s\` to 
avoid same record in table \`%s\` routing to multiple data nodes.               
 |
-| 20088       | 44000     | Cannot found routing table factor, data source: 
%s, actual table: %s.                                                           
 |
-| 20090       | 42000     | Not allow DML operation without sharding 
conditions.                                                                     
        |
+| Vendor Code | SQL State | Reason                                             
                                                                                
 |
+|-------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------|
+| 20000       | 44000     | Can not get uniformed table structure for logic 
table '%s', it has different meta data of actual tables are as follows: %s      
    |
+| 20001       | 42S02     | Can not find table rule with logic tables '%s'.    
                                                                                
 |
+| 20002       | 42S02     | Can not find data source in sharding rule, invalid 
actual data node '%s'.                                                          
 |
+| 20003       | 42S02     | Data nodes is required for sharding table '%s'.    
                                                                                
 |
+| 20004       | 42S02     | Actual table '%s.%s' is not in table rule 
configuration.                                                                  
          |
+| 20005       | 42S02     | Can not find binding actual table, data source is 
'%s', logic table is '%s', other actual table is '%s'.                          
  |
+| 20006       | 44000     | Actual tables '%s' are in use.                     
                                                                                
 |
+| 20007       | 42S01     | Index '%s' already exists.                         
                                                                                
 |
+| 20008       | 42S02     | Index '%s' does not exist.                         
                                                                                
 |
+| 20009       | 42S01     | View name has to bind to %s tables.                
                                                                                
 |
+| 20010       | 42S02     | %s configuration does not exist in database '%s'.  
                                                                                
 |
+| 20011       | 44000     | Invalid binding table configuration.               
                                                                                
 |
+| 20012       | 44000     | Only allowed 0 or 1 sharding strategy 
configuration.                                                                  
              |
+| 20013       | 42S01     | Same actual data node cannot be configured in 
multiple logic tables in same database, logical table '%s', actual data node 
'%s.%s'. |
+| 20020       | 44000     | Sharding value can not be null in SQL statement.   
                                                                                
 |
+| 20021       | HY004     | Found different types for sharding value '%s'.     
                                                                                
 |
+| 20022       | HY004     | Invalid %s, datetime pattern should be '%s', value 
is '%s'.                                                                        
 |
+| 20023       | 44000     | Sharding value %s subtract stop offset %d can not 
be less than start offset %d.                                                   
  |
+| 20024       | 44000     | %s value '%s' must implements Comparable.          
                                                                                
 |
+| 20030       | 0A000     | Can not support operation '%s' with sharding table 
'%s'.                                                                           
 |
+| 20031       | 44000     | Can not update sharding value for table '%s'.      
                                                                                
 |
+| 20032       | 0A000     | The CREATE VIEW statement contains unsupported 
query statement.                                                                
     |
+| 20033       | 44000     | PREPARE statement can not support sharding tables 
route to same data sources.                                                     
  |
+| 20034       | 44000     | The table inserted and the table selected must be 
the same or bind tables.                                                        
  |
+| 20035       | 0A000     | Can not support DML operation with multiple tables 
'%s'.                                                                           
 |
+| 20036       | 42000     | %s ... LIMIT can not support route to multiple 
data nodes.                                                                     
     |
+| 20037       | 44000     | Can not find actual data source intersection for 
logic tables '%s'.                                                              
   |
+| 20038       | 42000     | INSERT INTO ... SELECT can not support applying 
key generator with absent generate key column.                                  
    |
+| 20039       | 0A000     | Alter view rename .. to .. statement should have 
same config for '%s' and '%s'.                                                  
   |
+| 20040       | HY000     | '%s %s' can not route correctly for %s '%s'.       
                                                                                
 |
+| 20041       | 42S02     | Can not get route result, please check your 
sharding rule configuration.                                                    
        |
+| 20042       | 34000     | Can not get cursor name from fetch statement.      
                                                                                
 |
+| 20050       | HY000     | Sharding algorithm class '%s' should be implement 
'%s'.                                                                           
  |
+| 20051       | HY000     | Routed target '%s' does not exist, available 
targets are '%s'.                                                               
       |
+| 20052       | 44000     | Inline sharding algorithms expression '%s' and 
sharding column '%s' do not match.                                              
     |
+| 20053       | 44000     | Complex inline algorithm need %d sharing columns, 
but only found %d.                                                              
  |
+| 20054       | 44000     | No sharding database route info.                   
                                                                                
 |
+| 20055       | 44000     | Some routed data sources do not belong to 
configured data sources. routed data sources '%s', configured data sources 
'%s'.          |
+| 20056       | 44000     | Please check your sharding conditions '%s' to 
avoid same record in table '%s' routing to multiple data nodes.                 
      |
+| 20057       | 44000     | Can not find routing table factor, data source 
'%s', actual table '%s'.                                                        
     |
+| 20060       | HY000     | Invalid %s strategy '%s', strategy does not match 
data nodes.                                                                     
  |
+| 20090       | 42000     | Not allow DML operation without sharding 
conditions.                                                                     
           |
 
 ### SQL Federation
 
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactory.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactory.java
index 9b4f5a7f2f8..0d12c2db70e 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactory.java
+++ 
b/features/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.algorithm.sharding.ShardingAlgorithmClassImplementationException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.ShardingAlgorithmClassImplementationException;
 import org.apache.shardingsphere.sharding.spi.ShardingAlgorithm;
 
 import java.util.Properties;
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/ComplexInlineShardingAlgorithm.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/ComplexInlineShardingAlgorithm.java
index c76449ccd4c..fb0257b2634 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/ComplexInlineShardingAlgorithm.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/ComplexInlineShardingAlgorithm.java
@@ -24,7 +24,7 @@ import 
org.apache.shardingsphere.infra.exception.generic.UnsupportedSQLOperation
 import org.apache.shardingsphere.infra.expr.core.InlineExpressionParserFactory;
 import 
org.apache.shardingsphere.sharding.api.sharding.complex.ComplexKeysShardingAlgorithm;
 import 
org.apache.shardingsphere.sharding.api.sharding.complex.ComplexKeysShardingValue;
-import 
org.apache.shardingsphere.sharding.exception.algorithm.sharding.MismatchedComplexInlineShardingAlgorithmColumnAndValueSizeException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.MismatchedComplexInlineShardingAlgorithmColumnAndValueSizeException;
 import 
org.apache.shardingsphere.sharding.exception.data.NullShardingValueException;
 
 import java.util.Arrays;
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithm.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithm.java
index 3f871dc1640..82a08b55916 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithm.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithm.java
@@ -26,7 +26,7 @@ import 
org.apache.shardingsphere.infra.expr.core.InlineExpressionParserFactory;
 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.algorithm.sharding.MismatchedInlineShardingAlgorithmExpressionAndColumnException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.MismatchedInlineShardingAlgorithmExpressionAndColumnException;
 import 
org.apache.shardingsphere.sharding.exception.data.NullShardingValueException;
 
 import java.util.Collection;
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/DuplicateInsertDataRecordException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/DuplicateInsertDataRecordException.java
similarity index 84%
rename from 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/DuplicateInsertDataRecordException.java
rename to 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/DuplicateInsertDataRecordException.java
index a567f9bd7c1..015d9ee9120 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/DuplicateInsertDataRecordException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/DuplicateInsertDataRecordException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception.algorithm.sharding;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
@@ -29,6 +29,6 @@ public final class DuplicateInsertDataRecordException extends 
ShardingSQLExcepti
     private static final long serialVersionUID = -3448883456909841322L;
     
     public DuplicateInsertDataRecordException(final ShardingConditions 
shardingConditions, final String tableName) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 87, "Please check your 
sharding conditions `%s` to avoid same record in table `%s` routing to multiple 
data nodes.", shardingConditions, tableName);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 56, "Please check your 
sharding conditions '%s' to avoid same record in table '%s' routing to multiple 
data nodes.", shardingConditions, tableName);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/MismatchedComplexInlineShardingAlgorithmColumnAndValueSizeException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedComplexInlineShardingAlgorithmColumnAndValueSizeException.java
similarity index 91%
rename from 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/MismatchedComplexInlineShardingAlgorithmColumnAndValueSizeException.java
rename to 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedComplexInlineShardingAlgorithmColumnAndValueSizeException.java
index af249b7619e..0c03d0a58d8 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/MismatchedComplexInlineShardingAlgorithmColumnAndValueSizeException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedComplexInlineShardingAlgorithmColumnAndValueSizeException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception.algorithm.sharding;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
@@ -28,6 +28,6 @@ public final class 
MismatchedComplexInlineShardingAlgorithmColumnAndValueSizeExc
     private static final long serialVersionUID = -3667110081810167498L;
     
     public 
MismatchedComplexInlineShardingAlgorithmColumnAndValueSizeException(final int 
shardingColumnSize, final int shardingValueSize) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 84, "Complex inline 
algorithm need %d sharing columns, but only found %d.", shardingColumnSize, 
shardingValueSize);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 53, "Complex inline 
algorithm need %d sharing columns, but only found %d.", shardingColumnSize, 
shardingValueSize);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
similarity index 87%
rename from 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
rename to 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
index 53b39874825..35c646f988f 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedInlineShardingAlgorithmExpressionAndColumnException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception.algorithm.sharding;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
@@ -28,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, 82, "Inline sharding 
algorithms expression `%s` and sharding column `%s` do not match.", 
algorithmExpression, columnName);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 52, "Inline sharding 
algorithms expression '%s' and sharding column '%s' do not match.", 
algorithmExpression, columnName);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/MismatchedShardingDataSourceRouteInfoException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedShardingDataSourceRouteInfoException.java
similarity index 88%
rename from 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/MismatchedShardingDataSourceRouteInfoException.java
rename to 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedShardingDataSourceRouteInfoException.java
index 7cf07ecc64c..f84f4a2cf92 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/MismatchedShardingDataSourceRouteInfoException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/MismatchedShardingDataSourceRouteInfoException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception.algorithm.sharding;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
@@ -30,7 +30,7 @@ public final class 
MismatchedShardingDataSourceRouteInfoException extends Shardi
     private static final long serialVersionUID = -345707079477626285L;
     
     public MismatchedShardingDataSourceRouteInfoException(final 
Collection<String> routeDataSourceNames, final Collection<String> 
actualDataSourceNames) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 86, "Some routed data 
sources do not belong to configured data sources. routed data sources: `%s`, 
configured data sources: `%s`.",
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 55, "Some routed data 
sources do not belong to configured data sources. routed data sources '%s', 
configured data sources '%s'.",
                 routeDataSourceNames, actualDataSourceNames);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/NoShardingDatabaseRouteInfoException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/NoShardingDatabaseRouteInfoException.java
similarity index 90%
rename from 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/NoShardingDatabaseRouteInfoException.java
rename to 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/NoShardingDatabaseRouteInfoException.java
index 3b092e1af63..6b472799cce 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/NoShardingDatabaseRouteInfoException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/NoShardingDatabaseRouteInfoException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception.algorithm.sharding;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
@@ -28,6 +28,6 @@ public final class NoShardingDatabaseRouteInfoException 
extends ShardingSQLExcep
     private static final long serialVersionUID = -3091336980350038243L;
     
     public NoShardingDatabaseRouteInfoException() {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 85, "No sharding database 
route info.");
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 54, "No sharding database 
route info.");
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/NoShardingTableRouteFactorException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/NoShardingTableRouteFactorException.java
similarity index 84%
rename from 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/NoShardingTableRouteFactorException.java
rename to 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/NoShardingTableRouteFactorException.java
index 80765ecef0b..e3cb3403e5a 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/NoShardingTableRouteFactorException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/NoShardingTableRouteFactorException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception.algorithm.sharding;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
@@ -28,6 +28,6 @@ public final class NoShardingTableRouteFactorException 
extends ShardingSQLExcept
     private static final long serialVersionUID = 4833188125634678065L;
     
     public NoShardingTableRouteFactorException(final String dataSourceName, 
final String actualTable) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 88, "Cannot found routing 
table factor, data source: %s, actual table: %s.", dataSourceName, actualTable);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 57, "Can not find routing 
table factor, data source '%s', actual table '%s'.", dataSourceName, 
actualTable);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/ShardingAlgorithmClassImplementationException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingAlgorithmClassImplementationException.java
similarity index 87%
rename from 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/ShardingAlgorithmClassImplementationException.java
rename to 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingAlgorithmClassImplementationException.java
index b05706c423b..fe25d9e4091 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/ShardingAlgorithmClassImplementationException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingAlgorithmClassImplementationException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception.algorithm.sharding;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
@@ -28,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, 80, "Sharding algorithm class `%s` 
should be implement `%s`.", shardingAlgorithmClassName, 
superShardingAlgorithmClass.getName());
+        super(XOpenSQLState.GENERAL_ERROR, 50, "Sharding algorithm class '%s' 
should be implement '%s'.", shardingAlgorithmClassName, 
superShardingAlgorithmClass.getName());
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/ShardingRouteAlgorithmException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingRouteAlgorithmException.java
similarity index 87%
rename from 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/ShardingRouteAlgorithmException.java
rename to 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingRouteAlgorithmException.java
index b5d93091b50..5f30862d4d4 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/sharding/ShardingRouteAlgorithmException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/algorithm/ShardingRouteAlgorithmException.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.sharding.exception.algorithm.sharding;
+package org.apache.shardingsphere.sharding.exception.algorithm;
 
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
@@ -30,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, 81, "Routed target `%s` does not 
exist, available targets are `%s`.", routedTargetName, 
availableTargetNames.toString());
+        super(XOpenSQLState.GENERAL_ERROR, 51, "Routed target '%s' does not 
exist, available targets are '%s'.", routedTargetName, 
availableTargetNames.toString());
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/CursorNameNotFoundException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/CursorNameNotFoundException.java
index 09af5074c30..126de629b31 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/CursorNameNotFoundException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/CursorNameNotFoundException.java
@@ -28,6 +28,6 @@ public final class CursorNameNotFoundException extends 
ShardingSQLException {
     private static final long serialVersionUID = 3124329832945598311L;
     
     public CursorNameNotFoundException() {
-        super(XOpenSQLState.INVALID_CURSOR_NAME, 62, "Can not get cursor name 
from fetch statement.");
+        super(XOpenSQLState.INVALID_CURSOR_NAME, 42, "Can not get cursor name 
from fetch statement.");
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/EmptyShardingRouteResultException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/EmptyShardingRouteResultException.java
index ad7b1641bbf..7a5fdb761a3 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/EmptyShardingRouteResultException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/EmptyShardingRouteResultException.java
@@ -28,6 +28,6 @@ public final class EmptyShardingRouteResultException extends 
ShardingSQLExceptio
     private static final long serialVersionUID = -6548076668933945656L;
     
     public EmptyShardingRouteResultException() {
-        super(XOpenSQLState.NOT_FOUND, 61, "Can not get route result, please 
check your sharding rule configuration.");
+        super(XOpenSQLState.NOT_FOUND, 41, "Can not get route result, please 
check your sharding rule configuration.");
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/ShardingDDLRouteException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/ShardingDDLRouteException.java
index a7d85e5d028..36253761083 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/ShardingDDLRouteException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/connection/ShardingDDLRouteException.java
@@ -30,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, 60, "`%s %s` can not route 
correctly for %s `%s`.", operation, objectType, objectType, 
objectNames.toString());
+        super(XOpenSQLState.GENERAL_ERROR, 40, "'%s %s' can not route 
correctly for %s '%s'.", operation, objectType, objectType, objectNames);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/InvalidDatetimeFormatException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/InvalidDatetimeFormatException.java
index b65f01996f3..a04ab46fad2 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/InvalidDatetimeFormatException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/InvalidDatetimeFormatException.java
@@ -28,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, 22, "Invalid %s, datetime 
pattern should be `%s`, value is `%s`.", dateTimeKey, dateTimePattern, 
dateTimeValue);
+        super(XOpenSQLState.INVALID_DATA_TYPE, 22, "Invalid %s, datetime 
pattern should be '%s', value is '%s'.", dateTimeKey, dateTimePattern, 
dateTimeValue);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/NotImplementComparableValueException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/NotImplementComparableValueException.java
index b7725c22c8e..4eef4bdf92d 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/NotImplementComparableValueException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/NotImplementComparableValueException.java
@@ -28,6 +28,6 @@ public final class NotImplementComparableValueException 
extends ShardingSQLExcep
     private static final long serialVersionUID = 1442602803378775261L;
     
     public NotImplementComparableValueException(final String segmentType, 
final Object value) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 24, "%s value `%s` must 
implements Comparable.", segmentType, value);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 24, "%s value '%s' must 
implements Comparable.", segmentType, value);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/NullShardingValueException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/NullShardingValueException.java
index 395131dbdb6..20e4a65d4e1 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/NullShardingValueException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/NullShardingValueException.java
@@ -28,6 +28,6 @@ public final class NullShardingValueException extends 
ShardingSQLException {
     private static final long serialVersionUID = -6223086772479822057L;
     
     public NullShardingValueException() {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20, "Sharding value can't 
be null in SQL statement.");
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 20, "Sharding value can 
not be null in SQL statement.");
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/ShardingValueDataTypeException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/ShardingValueDataTypeException.java
index a05f14cf982..a29c24b2caa 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/ShardingValueDataTypeException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/data/ShardingValueDataTypeException.java
@@ -29,6 +29,6 @@ public final class ShardingValueDataTypeException extends 
ShardingSQLException {
     private static final long serialVersionUID = -4833106947304679015L;
     
     public ShardingValueDataTypeException(final Column column) {
-        super(XOpenSQLState.INVALID_DATA_TYPE, 21, "Found different types for 
sharding value `%s`.", column.toString());
+        super(XOpenSQLState.INVALID_DATA_TYPE, 21, "Found different types for 
sharding value '%s'.", column);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ActualTableNotFoundException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ActualTableNotFoundException.java
index 96dad523c0d..64152edfbd3 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ActualTableNotFoundException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ActualTableNotFoundException.java
@@ -28,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, 4, "Actual table `%s.%s` 
is not in table rule configuration.", dataSourceName, tableName);
+        super(XOpenSQLState.NOT_FOUND, 4, "Actual table '%s.%s' is not in 
table rule configuration.", dataSourceName, tableName);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/BindingTableNotFoundException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/BindingTableNotFoundException.java
index 7d80a7c4143..13a17faff32 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/BindingTableNotFoundException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/BindingTableNotFoundException.java
@@ -28,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, 5,
-                "Can not find binding actual table, data source is `%s`, logic 
table is `%s`, other actual table is `%s`.", dataSource, logicTable, 
otherActualTable);
+        super(XOpenSQLState.NOT_FOUND, 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/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodeGenerateException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodeGenerateException.java
index 813656f2a9d..21259c5f19f 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodeGenerateException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodeGenerateException.java
@@ -28,6 +28,6 @@ public final class DataNodeGenerateException extends 
ShardingSQLException {
     private static final long serialVersionUID = -1000865538051567910L;
     
     public DataNodeGenerateException(final String dataNode) {
-        super(XOpenSQLState.NOT_FOUND, 2, "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/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicatedIndexException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicateIndexException.java
similarity index 83%
rename from 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicatedIndexException.java
rename to 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicateIndexException.java
index a020744b27f..e11731beebb 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicatedIndexException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicateIndexException.java
@@ -21,13 +21,13 @@ import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpe
 import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
- * Duplicated index exception.
+ * Duplicate index exception.
  */
-public final class DuplicatedIndexException extends ShardingSQLException {
+public final class DuplicateIndexException extends ShardingSQLException {
     
     private static final long serialVersionUID = 2884666477007627873L;
     
-    public DuplicatedIndexException(final String indexName) {
-        super(XOpenSQLState.DUPLICATE, 7, "Index `%s` already exists.", 
indexName);
+    public DuplicateIndexException(final String indexName) {
+        super(XOpenSQLState.DUPLICATE, 7, "Index '%s' already exists.", 
indexName);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicateSharingActualDataNodeException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicateSharingActualDataNodeException.java
index ccd6fb90a6d..b5946a68c0e 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicateSharingActualDataNodeException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DuplicateSharingActualDataNodeException.java
@@ -28,7 +28,7 @@ public final class DuplicateSharingActualDataNodeException 
extends ShardingSQLEx
     private static final long serialVersionUID = 3503761639898230998L;
     
     public DuplicateSharingActualDataNodeException(final String 
logicalTableName, final String dataSourceName, final String tableName) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 14, String.format(
-                "Same actual data node cannot be configured in multiple logic 
tables in same database, logical table:`%s`, actual data node: `%s`.`%s`.", 
logicalTableName, dataSourceName, tableName));
+        super(XOpenSQLState.DUPLICATE, 13,
+                "Same actual data node cannot be configured in multiple logic 
tables in same database, logical table '%s', actual data node '%s.%s'.", 
logicalTableName, dataSourceName, tableName);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DropInUsedTablesException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InUsedTablesException.java
similarity index 83%
rename from 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DropInUsedTablesException.java
rename to 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InUsedTablesException.java
index 31c99792beb..5dd37762821 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DropInUsedTablesException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InUsedTablesException.java
@@ -23,13 +23,13 @@ import 
org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 import java.util.Collection;
 
 /**
- * Drop in used tables exception.
+ * In used tables exception.
  */
-public final class DropInUsedTablesException extends ShardingSQLException {
+public final class InUsedTablesException extends ShardingSQLException {
     
     private static final long serialVersionUID = 8939233348292246498L;
     
-    public DropInUsedTablesException(final Collection<String> inUsedTables) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 6, "Actual tables `%s` are 
in use.", inUsedTables.toString());
+    public InUsedTablesException(final Collection<String> inUsedTables) {
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 6, "Actual tables '%s' are 
in use.", inUsedTables);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InconsistentShardingTableMetaDataException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InconsistentShardingTableMetaDataException.java
index b4cb9738077..97266cff683 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InconsistentShardingTableMetaDataException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InconsistentShardingTableMetaDataException.java
@@ -31,12 +31,12 @@ public final class 
InconsistentShardingTableMetaDataException extends ShardingSQ
     private static final long serialVersionUID = -5450346946223396192L;
     
     public InconsistentShardingTableMetaDataException(final String 
logicTableName, final Collection<TableMetaDataViolation> violations) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 1, 
createReason(violations), logicTableName);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 0, 
createReason(violations), logicTableName);
     }
     
     private static String createReason(final 
Collection<TableMetaDataViolation> violations) {
         StringBuilder result = new StringBuilder(
-                "Can not get uniformed table structure for logic table `%s`, 
it has different meta data of actual tables are as follows: 
").append(System.lineSeparator());
+                "Can not get uniformed table structure for logic table '%s', 
it has different meta data of actual tables are as follows: 
").append(System.lineSeparator());
         for (TableMetaDataViolation each : violations) {
             result.append("actual table: 
").append(each.getActualTableName()).append(", meta data: 
").append(each.getTableMetaData()).append(System.lineSeparator());
         }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/IndexNotExistedException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/IndexNotExistedException.java
index 4c0d1052083..f55c354797b 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/IndexNotExistedException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/IndexNotExistedException.java
@@ -28,6 +28,6 @@ public final class IndexNotExistedException extends 
ShardingSQLException {
     private static final long serialVersionUID = 206503570677185269L;
     
     public IndexNotExistedException(final String indexName) {
-        super(XOpenSQLState.NOT_FOUND, 8, "Index `%s` does not exist.", 
indexName);
+        super(XOpenSQLState.NOT_FOUND, 8, "Index '%s' does not exist.", 
indexName);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InvalidBindingTablesException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InvalidBindingTablesException.java
index 31d9ca7340f..9f374309d3c 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InvalidBindingTablesException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/InvalidBindingTablesException.java
@@ -28,6 +28,6 @@ public final class InvalidBindingTablesException extends 
ShardingSQLException {
     private static final long serialVersionUID = 6913516240331555395L;
     
     public InvalidBindingTablesException() {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 12, "Invalid binding table 
configuration in ShardingRuleConfiguration.");
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 11, "Invalid binding table 
configuration.");
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodesMissedWithShardingTableException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/MissingRequiredDataNodesException.java
similarity index 76%
rename from 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodesMissedWithShardingTableException.java
rename to 
features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/MissingRequiredDataNodesException.java
index dbfdfe1e068..7b54a25c1b8 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/DataNodesMissedWithShardingTableException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/MissingRequiredDataNodesException.java
@@ -21,13 +21,13 @@ import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpe
 import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
 
 /**
- * Data nodes missed with sharding table exception.
+ * Missing required data nodes exception.
  */
-public final class DataNodesMissedWithShardingTableException extends 
ShardingSQLException {
+public final class MissingRequiredDataNodesException extends 
ShardingSQLException {
     
     private static final long serialVersionUID = 1691113459377955727L;
     
-    public DataNodesMissedWithShardingTableException(final String tableName) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 3, "Data nodes must be 
configured for sharding table `%s`.", tableName);
+    public MissingRequiredDataNodesException(final String tableName) {
+        super(XOpenSQLState.NOT_FOUND, 3, "Data nodes is required for sharding 
table '%s'.", tableName);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/MissingRequiredShardingConfigurationException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/MissingRequiredShardingConfigurationException.java
index 435be1d4eef..79175a27613 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/MissingRequiredShardingConfigurationException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/MissingRequiredShardingConfigurationException.java
@@ -28,10 +28,10 @@ public final class 
MissingRequiredShardingConfigurationException extends Shardin
     private static final long serialVersionUID = -7307832800220432407L;
     
     public MissingRequiredShardingConfigurationException(final String 
configKey) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 11, "`%s` configuration 
does not exist.", configKey);
+        super(XOpenSQLState.NOT_FOUND, 10, "%s configuration does not exist.", 
configKey);
     }
     
     public MissingRequiredShardingConfigurationException(final String 
configKey, final String databaseName) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 11, "`%s` configuration 
does not exist in database `%s`.", configKey, databaseName);
+        super(XOpenSQLState.NOT_FOUND, 10, "%s configuration does not exist in 
database '%s'.", configKey, databaseName);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ShardingRuleNotFoundException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ShardingRuleNotFoundException.java
deleted file mode 100644
index dd039772d67..00000000000
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ShardingRuleNotFoundException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.sharding.exception.metadata;
-
-import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
-import org.apache.shardingsphere.sharding.exception.ShardingSQLException;
-
-/**
- * Sharding rule not found exception.
- */
-public final class ShardingRuleNotFoundException extends ShardingSQLException {
-    
-    private static final long serialVersionUID = 2221013821545620446L;
-    
-    public ShardingRuleNotFoundException() {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 13, "Can not find sharding 
rule.");
-    }
-}
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ShardingTableRuleNotFoundException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ShardingTableRuleNotFoundException.java
index dfa3749c63a..3a6c31ec97f 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ShardingTableRuleNotFoundException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/metadata/ShardingTableRuleNotFoundException.java
@@ -30,6 +30,6 @@ public final class ShardingTableRuleNotFoundException extends 
ShardingSQLExcepti
     private static final long serialVersionUID = 142299282103233064L;
     
     public ShardingTableRuleNotFoundException(final Collection<String> 
logicTables) {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 0, "Can not find table 
rule with logic tables `%s`.", logicTables.toString());
+        super(XOpenSQLState.NOT_FOUND, 1, "Can not find table rule with logic 
tables '%s'.", logicTables);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/strategy/InvalidShardingStrategyConfigurationException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/strategy/InvalidShardingStrategyConfigurationException.java
index 0c4eb31ee4b..bc40959361d 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/strategy/InvalidShardingStrategyConfigurationException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/strategy/InvalidShardingStrategyConfigurationException.java
@@ -27,7 +27,7 @@ public final class 
InvalidShardingStrategyConfigurationException extends Shardin
     
     private static final long serialVersionUID = -5874317771225005670L;
     
-    public InvalidShardingStrategyConfigurationException(final String 
strategyLevel, final String strategyType, final String message) {
-        super(XOpenSQLState.GENERAL_ERROR, 99, String.format("Invalid %s 
strategy `%s`, %s.", strategyLevel, strategyType, message));
+    public InvalidShardingStrategyConfigurationException(final String 
strategyLevel, final String strategyType) {
+        super(XOpenSQLState.GENERAL_ERROR, 60, "Invalid %s strategy '%s', 
strategy does not match data nodes.", strategyLevel, strategyType);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLMultipleDataNodesWithLimitException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLMultipleDataNodesWithLimitException.java
index 4e76533ed4c..634868c23ee 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLMultipleDataNodesWithLimitException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLMultipleDataNodesWithLimitException.java
@@ -28,6 +28,6 @@ public final class DMLMultipleDataNodesWithLimitException 
extends ShardingSQLExc
     private static final long serialVersionUID = -203240151021113065L;
     
     public DMLMultipleDataNodesWithLimitException(final String operation) {
-        super(XOpenSQLState.SYNTAX_ERROR, 46, "%s ... LIMIT can not support 
route to multiple data nodes.", operation);
+        super(XOpenSQLState.SYNTAX_ERROR, 36, "%s ... LIMIT can not support 
route to multiple data nodes.", operation);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLWithMultipleShardingTablesException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLWithMultipleShardingTablesException.java
index 9cec484aa59..b82c8ca1b06 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLWithMultipleShardingTablesException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DMLWithMultipleShardingTablesException.java
@@ -30,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, 45, "Can not support DML 
operation with multiple tables `%s`.", tableNames.toString());
+        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 35, "Can not support DML 
operation with multiple tables '%s'.", tableNames);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DataSourceIntersectionNotFoundException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DataSourceIntersectionNotFoundException.java
index ae1539ab8be..963cfc35e1f 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DataSourceIntersectionNotFoundException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/DataSourceIntersectionNotFoundException.java
@@ -30,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, 47, "Can not find actual 
data source intersection for logic tables `%s`.", logicTables);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 37, "Can not find actual 
data source intersection for logic tables '%s'.", logicTables);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/InsertSelectTableViolationException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/InsertSelectTableViolationException.java
index 49ac143b164..27b16c8061e 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/InsertSelectTableViolationException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/InsertSelectTableViolationException.java
@@ -28,6 +28,6 @@ public final class InsertSelectTableViolationException 
extends ShardingSQLExcept
     private static final long serialVersionUID = 1221612068163533037L;
     
     public InsertSelectTableViolationException() {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 44, "The table inserted 
and the table selected must be the same or bind tables.");
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 34, "The table inserted 
and the table selected must be the same or bind tables.");
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/MissingGenerateKeyColumnWithInsertSelectException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/MissingGenerateKeyColumnWithInsertSelectException.java
index 9246e0ee45e..84c0e79656c 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/MissingGenerateKeyColumnWithInsertSelectException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/MissingGenerateKeyColumnWithInsertSelectException.java
@@ -28,6 +28,6 @@ public final class 
MissingGenerateKeyColumnWithInsertSelectException extends Sha
     private static final long serialVersionUID = 568269722599010228L;
     
     public MissingGenerateKeyColumnWithInsertSelectException() {
-        super(XOpenSQLState.SYNTAX_ERROR, 48, "INSERT INTO ... SELECT can not 
support applying key generator with absent generate key column.");
+        super(XOpenSQLState.SYNTAX_ERROR, 38, "INSERT INTO ... SELECT can not 
support applying key generator with absent generate key column.");
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/RenamedViewWithoutSameConfigurationException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/RenamedViewWithoutSameConfigurationException.java
index 14a72ce46e3..3e10814fb56 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/RenamedViewWithoutSameConfigurationException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/RenamedViewWithoutSameConfigurationException.java
@@ -28,6 +28,6 @@ public final class 
RenamedViewWithoutSameConfigurationException extends Sharding
     private static final long serialVersionUID = -8276278970848162458L;
     
     public RenamedViewWithoutSameConfigurationException(final String 
originView, final String targetView) {
-        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 49, "Alter view rename .. 
to .. statement should have same config for %s and %s.", originView, 
targetView);
+        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 39, "Alter view rename .. 
to .. statement should have same config for %s and %s.", originView, 
targetView);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedCreateViewException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedCreateViewException.java
index 09a207bbe14..3a9f1e3b5cd 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedCreateViewException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedCreateViewException.java
@@ -28,6 +28,6 @@ public final class UnsupportedCreateViewException extends 
ShardingSQLException {
     private static final long serialVersionUID = -321126834428609310L;
     
     public UnsupportedCreateViewException() {
-        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 42, "The CREATE VIEW 
statement contains unsupported query statement.");
+        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 32, "The CREATE VIEW 
statement contains unsupported query statement.");
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedPrepareRouteToSameDataSourceException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedPrepareRouteToSameDataSourceException.java
index 708fb40e864..b206ef522d1 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedPrepareRouteToSameDataSourceException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedPrepareRouteToSameDataSourceException.java
@@ -28,6 +28,6 @@ public final class 
UnsupportedPrepareRouteToSameDataSourceException extends Shar
     private static final long serialVersionUID = -451667286925533523L;
     
     public UnsupportedPrepareRouteToSameDataSourceException() {
-        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 43, "PREPARE statement can 
not support sharding tables route to same data sources.");
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 33, "PREPARE statement can 
not support sharding tables route to same data sources.");
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedShardingOperationException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedShardingOperationException.java
index 7ecca27fefd..bc9e0fab98d 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedShardingOperationException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedShardingOperationException.java
@@ -28,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, 40, "Can not support 
operation `%s` with sharding table `%s`.", operation, tableName);
+        super(XOpenSQLState.FEATURE_NOT_SUPPORTED, 30, "Can not support 
operation '%s' with sharding table '%s'.", operation, tableName);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedUpdatingShardingValueException.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedUpdatingShardingValueException.java
index 2d3ad125530..1b4b7f566ee 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedUpdatingShardingValueException.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/exception/syntax/UnsupportedUpdatingShardingValueException.java
@@ -28,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, 41, "Can not update 
sharding value for table `%s`.", tableName);
+        super(XOpenSQLState.CHECK_OPTION_VIOLATION, 31, "Can not update 
sharding value for table '%s'.", tableName);
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingCartesianRoutingEngine.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingCartesianRoutingEngine.java
index 34876e677a0..128d5f1b50f 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingCartesianRoutingEngine.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/complex/ShardingCartesianRoutingEngine.java
@@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
 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.algorithm.sharding.NoShardingTableRouteFactorException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.NoShardingTableRouteFactorException;
 import 
org.apache.shardingsphere.sharding.route.engine.type.ShardingRouteEngine;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngine.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngine.java
index 78d51d5a4ac..f41bf804e68 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngine.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngine.java
@@ -29,8 +29,8 @@ import 
org.apache.shardingsphere.infra.route.context.RouteUnit;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
 import 
org.apache.shardingsphere.sharding.api.config.strategy.sharding.HintShardingStrategyConfiguration;
 import 
org.apache.shardingsphere.sharding.api.config.strategy.sharding.ShardingStrategyConfiguration;
-import 
org.apache.shardingsphere.sharding.exception.algorithm.sharding.MismatchedShardingDataSourceRouteInfoException;
-import 
org.apache.shardingsphere.sharding.exception.algorithm.sharding.NoShardingDatabaseRouteInfoException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.MismatchedShardingDataSourceRouteInfoException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.NoShardingDatabaseRouteInfoException;
 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/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterIndexStatementValidator.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterIndexStatementValidator.java
index c2aaaf69835..65b7aa9f5c4 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterIndexStatementValidator.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingAlterIndexStatementValidator.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.infra.hint.HintValueContext;
 import 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import 
org.apache.shardingsphere.sharding.exception.metadata.DuplicatedIndexException;
+import 
org.apache.shardingsphere.sharding.exception.metadata.DuplicateIndexException;
 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;
@@ -53,7 +53,7 @@ public final class ShardingAlterIndexStatementValidator 
extends ShardingDDLState
         }
         Optional<IndexSegment> renameIndex = 
AlterIndexStatementHandler.getRenameIndexSegment(alterIndexStatement);
         if (renameIndex.isPresent() && isSchemaContainsIndex(schema, 
renameIndex.get())) {
-            throw new 
DuplicatedIndexException(renameIndex.get().getIndexName().getIdentifier().getValue());
+            throw new 
DuplicateIndexException(renameIndex.get().getIndexName().getIdentifier().getValue());
         }
     }
     
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateIndexStatementValidator.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateIndexStatementValidator.java
index 6822bbc1aff..5dd5941241d 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateIndexStatementValidator.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingCreateIndexStatementValidator.java
@@ -25,7 +25,7 @@ import org.apache.shardingsphere.infra.hint.HintValueContext;
 import 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import 
org.apache.shardingsphere.sharding.exception.metadata.DuplicatedIndexException;
+import 
org.apache.shardingsphere.sharding.exception.metadata.DuplicateIndexException;
 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;
@@ -53,7 +53,7 @@ public final class ShardingCreateIndexStatementValidator 
extends ShardingDDLStat
         String tableName = 
createIndexStatement.getTable().getTableName().getIdentifier().getValue();
         String indexName = ((IndexAvailable) 
sqlStatementContext).getIndexes().stream().map(each -> 
each.getIndexName().getIdentifier().getValue()).findFirst().orElse(null);
         if (schema.containsIndex(tableName, indexName)) {
-            throw new DuplicatedIndexException(indexName);
+            throw new DuplicateIndexException(indexName);
         }
     }
     
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropTableStatementValidator.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropTableStatementValidator.java
index 05343c5bd5c..50974a09bc9 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropTableStatementValidator.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/impl/ShardingDropTableStatementValidator.java
@@ -29,7 +29,7 @@ import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSp
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteMapper;
 import 
org.apache.shardingsphere.sharding.exception.connection.ShardingDDLRouteException;
-import 
org.apache.shardingsphere.sharding.exception.metadata.DropInUsedTablesException;
+import 
org.apache.shardingsphere.sharding.exception.metadata.InUsedTablesException;
 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;
@@ -85,6 +85,6 @@ public final class ShardingDropTableStatementValidator 
extends ShardingDDLStatem
         // TODO check actual tables not be used in multi rules, and remove 
this check logic
         Set<String> actualTables = 
routeContext.getRouteUnits().stream().flatMap(each -> 
each.getTableMappers().stream().map(RouteMapper::getActualName)).collect(Collectors.toSet());
         Collection<String> inUsedTables = 
actualTables.stream().filter(otherRuleActualTables::contains).collect(Collectors.toList());
-        ShardingSpherePreconditions.checkState(inUsedTables.isEmpty(), () -> 
new DropInUsedTablesException(inUsedTables));
+        ShardingSpherePreconditions.checkState(inUsedTables.isEmpty(), () -> 
new InUsedTablesException(inUsedTables));
     }
 }
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java
index e80137d66aa..08accd4aee1 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/impl/ShardingInsertStatementValidator.java
@@ -26,7 +26,7 @@ import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePrecondition
 import org.apache.shardingsphere.infra.hint.HintValueContext;
 import 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
-import 
org.apache.shardingsphere.sharding.exception.algorithm.sharding.DuplicateInsertDataRecordException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.DuplicateInsertDataRecordException;
 import 
org.apache.shardingsphere.sharding.exception.syntax.InsertSelectTableViolationException;
 import 
org.apache.shardingsphere.sharding.exception.syntax.MissingGenerateKeyColumnWithInsertSelectException;
 import 
org.apache.shardingsphere.sharding.exception.syntax.UnsupportedShardingOperationException;
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java
index 08d6759d126..d46fb4922cb 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/route/strategy/type/standard/StandardShardingStrategy.java
@@ -24,7 +24,7 @@ import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePrecondition
 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.algorithm.sharding.ShardingRouteAlgorithmException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.ShardingRouteAlgorithmException;
 import 
org.apache.shardingsphere.sharding.exception.metadata.MissingRequiredShardingConfigurationException;
 import 
org.apache.shardingsphere.sharding.route.engine.condition.value.ListShardingConditionValue;
 import 
org.apache.shardingsphere.sharding.route.engine.condition.value.RangeShardingConditionValue;
diff --git 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/ShardingTable.java
 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/ShardingTable.java
index 587dad037a2..b0498a3ccf0 100644
--- 
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/ShardingTable.java
+++ 
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/ShardingTable.java
@@ -34,7 +34,7 @@ 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.sharding.ShardingAutoTableAlgorithm;
 import 
org.apache.shardingsphere.sharding.exception.metadata.DataNodeGenerateException;
-import 
org.apache.shardingsphere.sharding.exception.metadata.DataNodesMissedWithShardingTableException;
+import 
org.apache.shardingsphere.sharding.exception.metadata.MissingRequiredDataNodesException;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -256,7 +256,7 @@ public final class ShardingTable {
     
     private void checkRule(final List<String> dataNodes) {
         ShardingSpherePreconditions.checkState(!isEmptyDataNodes(dataNodes) || 
null == tableShardingStrategyConfig || tableShardingStrategyConfig instanceof 
NoneShardingStrategyConfiguration,
-                () -> new 
DataNodesMissedWithShardingTableException(logicTable));
+                () -> new MissingRequiredDataNodesException(logicTable));
     }
     
     /**
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java
index 8152c418fd6..48f0c215092 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmFactoryTest.java
+++ 
b/features/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.algorithm.sharding.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.jupiter.api.Test;
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java
index 3a291578419..7d64a1020ba 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/classbased/ClassBasedShardingAlgorithmTest.java
@@ -25,7 +25,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.algorithm.sharding.ShardingAlgorithmClassImplementationException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.ShardingAlgorithmClassImplementationException;
 import 
org.apache.shardingsphere.sharding.fixture.ClassBasedComplexKeysShardingAlgorithmFixture;
 import 
org.apache.shardingsphere.sharding.fixture.ClassBasedHintShardingAlgorithmFixture;
 import 
org.apache.shardingsphere.sharding.fixture.ClassBasedStandardShardingAlgorithmFixture;
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java
index 1d9619450c3..b1d62e0d842 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/algorithm/sharding/inline/InlineShardingAlgorithmTest.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.infra.datanode.DataNodeInfo;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
 import 
org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
 import 
org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
-import 
org.apache.shardingsphere.sharding.exception.algorithm.sharding.MismatchedInlineShardingAlgorithmExpressionAndColumnException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.MismatchedInlineShardingAlgorithmExpressionAndColumnException;
 import org.apache.shardingsphere.sharding.spi.ShardingAlgorithm;
 import org.apache.shardingsphere.test.util.PropertiesBuilder;
 import org.apache.shardingsphere.test.util.PropertiesBuilder.Property;
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java
index ba64c8f7f4c..c468534476b 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/type/standard/ShardingStandardRoutingEngineTest.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.infra.hint.HintManager;
 import org.apache.shardingsphere.infra.hint.HintValueContext;
 import org.apache.shardingsphere.infra.route.context.RouteContext;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
-import 
org.apache.shardingsphere.sharding.exception.algorithm.sharding.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.ShardingRoutingEngineFixtureBuilder;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterIndexStatementValidatorTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterIndexStatementValidatorTest.java
index 170017846df..b7523e2a5e4 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterIndexStatementValidatorTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingAlterIndexStatementValidatorTest.java
@@ -21,7 +21,7 @@ import 
org.apache.shardingsphere.infra.binder.context.statement.ddl.AlterIndexSt
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable;
-import 
org.apache.shardingsphere.sharding.exception.metadata.DuplicatedIndexException;
+import 
org.apache.shardingsphere.sharding.exception.metadata.DuplicateIndexException;
 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;
@@ -89,7 +89,7 @@ class ShardingAlterIndexStatementValidatorTest {
         
when(database.getSchema("public").getTable("t_order")).thenReturn(table);
         when(table.containsIndex("t_order_index")).thenReturn(true);
         when(table.containsIndex("t_order_index_new")).thenReturn(true);
-        assertThrows(DuplicatedIndexException.class,
+        assertThrows(DuplicateIndexException.class,
                 () -> new ShardingAlterIndexStatementValidator().preValidate(
                         shardingRule, new 
AlterIndexStatementContext(sqlStatement), Collections.emptyList(), database, 
mock(ConfigurationProperties.class)));
     }
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java
index eb7440278ac..d927642a4d3 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingCreateIndexStatementValidatorTest.java
@@ -22,7 +22,7 @@ import 
org.apache.shardingsphere.infra.binder.context.statement.ddl.CreateIndexS
 import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
 import 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import 
org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable;
-import 
org.apache.shardingsphere.sharding.exception.metadata.DuplicatedIndexException;
+import 
org.apache.shardingsphere.sharding.exception.metadata.DuplicateIndexException;
 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;
@@ -86,7 +86,7 @@ class ShardingCreateIndexStatementValidatorTest {
         ShardingSphereTable table = mock(ShardingSphereTable.class);
         
when(database.getSchema("public").getTable("t_order")).thenReturn(table);
         when(database.getSchema("public").containsIndex("t_order", 
"t_order_index")).thenReturn(true);
-        assertThrows(DuplicatedIndexException.class,
+        assertThrows(DuplicateIndexException.class,
                 () -> new ShardingCreateIndexStatementValidator().preValidate(
                         shardingRule, new 
CreateIndexStatementContext(sqlStatement), Collections.emptyList(), database, 
mock(ConfigurationProperties.class)));
     }
@@ -126,7 +126,7 @@ class ShardingCreateIndexStatementValidatorTest {
         ShardingSphereTable table = mock(ShardingSphereTable.class);
         
when(database.getSchema("public").getTable("t_order")).thenReturn(table);
         when(database.getSchema("public").containsIndex("t_order", 
"content_idx")).thenReturn(true);
-        assertThrows(DuplicatedIndexException.class,
+        assertThrows(DuplicateIndexException.class,
                 () -> new ShardingCreateIndexStatementValidator().preValidate(
                         shardingRule, new 
CreateIndexStatementContext(sqlStatement), Collections.emptyList(), database, 
mock(ConfigurationProperties.class)));
     }
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java
index 3003f2af2c0..7dfc07ad0e4 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/ddl/ShardingDropTableStatementValidatorTest.java
@@ -27,7 +27,7 @@ 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.connection.ShardingDDLRouteException;
-import 
org.apache.shardingsphere.sharding.exception.metadata.DropInUsedTablesException;
+import 
org.apache.shardingsphere.sharding.exception.metadata.InUsedTablesException;
 import 
org.apache.shardingsphere.sharding.route.engine.validator.ddl.impl.ShardingDropTableStatementValidator;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import org.apache.shardingsphere.sharding.rule.ShardingTable;
@@ -96,7 +96,7 @@ class ShardingDropTableStatementValidatorTest {
         routeUnits.add(routeUnit);
         RouteContext routeContext = mock(RouteContext.class);
         when(routeContext.getRouteUnits()).thenReturn(routeUnits);
-        assertThrows(DropInUsedTablesException.class,
+        assertThrows(InUsedTablesException.class,
                 () -> validator.postValidate(shardingRule, new 
DropTableStatementContext(sqlStatement), new HintValueContext(), 
Collections.emptyList(), database,
                         mock(ConfigurationProperties.class), routeContext));
     }
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java
index cf9b6a67a1f..3cbc2609478 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/route/engine/validator/dml/ShardingInsertStatementValidatorTest.java
@@ -35,7 +35,7 @@ import 
org.apache.shardingsphere.infra.route.context.RouteMapper;
 import org.apache.shardingsphere.infra.route.context.RouteUnit;
 import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
 import 
org.apache.shardingsphere.sharding.api.config.strategy.sharding.StandardShardingStrategyConfiguration;
-import 
org.apache.shardingsphere.sharding.exception.algorithm.sharding.DuplicateInsertDataRecordException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.DuplicateInsertDataRecordException;
 import 
org.apache.shardingsphere.sharding.exception.syntax.DMLWithMultipleShardingTablesException;
 import 
org.apache.shardingsphere.sharding.exception.syntax.InsertSelectTableViolationException;
 import 
org.apache.shardingsphere.sharding.exception.syntax.MissingGenerateKeyColumnWithInsertSelectException;
diff --git 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingTableTest.java
 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingTableTest.java
index a94f90e2990..38bad54b5d2 100644
--- 
a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingTableTest.java
+++ 
b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingTableTest.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.metadata.DataNodesMissedWithShardingTableException;
+import 
org.apache.shardingsphere.sharding.exception.metadata.MissingRequiredDataNodesException;
 import org.apache.shardingsphere.sharding.spi.ShardingAlgorithm;
 import org.apache.shardingsphere.test.util.PropertiesBuilder;
 import org.apache.shardingsphere.test.util.PropertiesBuilder.Property;
@@ -148,7 +148,7 @@ class ShardingTableTest {
     void assertActualDataNodesNotConfigured() {
         ShardingTableRuleConfiguration shardingTableRuleConfig = new 
ShardingTableRuleConfiguration("LOGIC_TABLE", "");
         shardingTableRuleConfig.setTableShardingStrategy(new 
StandardShardingStrategyConfiguration("shardingColumn", "INLINE"));
-        assertThrows(DataNodesMissedWithShardingTableException.class, () -> 
new ShardingTable(shardingTableRuleConfig, Arrays.asList("ds0", "ds1"), null));
+        assertThrows(MissingRequiredDataNodesException.class, () -> new 
ShardingTable(shardingTableRuleConfig, Arrays.asList("ds0", "ds1"), null));
     }
     
     @Test
diff --git 
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/checker/ShardingTableRuleStatementChecker.java
 
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/checker/ShardingTableRuleStatementChecker.java
index eac2af4a67a..7d46e04056a 100644
--- 
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/checker/ShardingTableRuleStatementChecker.java
+++ 
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/checker/ShardingTableRuleStatementChecker.java
@@ -54,7 +54,7 @@ import 
org.apache.shardingsphere.sharding.distsql.segment.strategy.ShardingStrat
 import 
org.apache.shardingsphere.sharding.distsql.segment.table.AbstractTableRuleSegment;
 import 
org.apache.shardingsphere.sharding.distsql.segment.table.AutoTableRuleSegment;
 import 
org.apache.shardingsphere.sharding.distsql.segment.table.TableRuleSegment;
-import 
org.apache.shardingsphere.sharding.exception.algorithm.sharding.ShardingAlgorithmClassImplementationException;
+import 
org.apache.shardingsphere.sharding.exception.algorithm.ShardingAlgorithmClassImplementationException;
 import 
org.apache.shardingsphere.sharding.exception.metadata.ShardingTableRuleNotFoundException;
 import 
org.apache.shardingsphere.sharding.exception.strategy.InvalidShardingStrategyConfigurationException;
 import 
org.apache.shardingsphere.sharding.rule.BindingTableCheckedConfiguration;
@@ -419,7 +419,7 @@ public final class ShardingTableRuleStatementChecker {
                 if 
("none".equalsIgnoreCase(databaseStrategySegment.get().getType())) {
                     Collection<String> requiredDataSources = 
getRequiredDataSources(rules);
                     ShardingSpherePreconditions.checkState(1 == 
requiredDataSources.size(),
-                            () -> new 
InvalidShardingStrategyConfigurationException("database", 
databaseStrategySegment.get().getType(), "strategy does not match data nodes"));
+                            () -> new 
InvalidShardingStrategyConfigurationException("database", 
databaseStrategySegment.get().getType()));
                 } else {
                     AlgorithmSegment databaseShardingAlgorithm = 
databaseStrategySegment.get().getShardingAlgorithm();
                     checkDatabaseShardingAlgorithm(each, 
databaseShardingAlgorithm);
@@ -430,7 +430,7 @@ public final class ShardingTableRuleStatementChecker {
                 if 
("none".equalsIgnoreCase(tableStrategySegment.get().getType())) {
                     Collection<String> requiredTables = 
getRequiredTables(rules);
                     ShardingSpherePreconditions.checkState(1 == 
requiredTables.size(),
-                            () -> new 
InvalidShardingStrategyConfigurationException("table", 
tableStrategySegment.get().getType(), "strategy does not match data nodes"));
+                            () -> new 
InvalidShardingStrategyConfigurationException("table", 
tableStrategySegment.get().getType()));
                 } else {
                     AlgorithmSegment tableShardingAlgorithm = 
tableStrategySegment.get().getShardingAlgorithm();
                     checkTableShardingAlgorithm(each, tableShardingAlgorithm);
diff --git 
a/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/query/ShowShardingTableNodesExecutorTest.java
 
b/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/query/ShowShardingTableNodesExecutorTest.java
index 25bbd5b7658..f8d3bddc112 100644
--- 
a/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/query/ShowShardingTableNodesExecutorTest.java
+++ 
b/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/query/ShowShardingTableNodesExecutorTest.java
@@ -29,7 +29,6 @@ import 
org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration;
 import org.apache.shardingsphere.mode.manager.ContextManager;
 import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
 import 
org.apache.shardingsphere.sharding.distsql.statement.ShowShardingTableNodesStatement;
-import 
org.apache.shardingsphere.sharding.exception.metadata.ShardingRuleNotFoundException;
 import org.apache.shardingsphere.sharding.rule.ShardingRule;
 import 
org.apache.shardingsphere.sharding.yaml.swapper.ShardingRuleConfigurationConverter;
 import org.apache.shardingsphere.test.fixture.jdbc.MockedDataSource;
@@ -46,6 +45,7 @@ import java.util.Optional;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -79,9 +79,9 @@ class ShowShardingTableNodesExecutorTest {
         URL url = 
getClass().getClassLoader().getResource("yaml/config_sharding_for_table_nodes.yaml");
         assertNotNull(url);
         YamlRootConfiguration yamlRootConfig = YamlEngine.unmarshal(new 
File(url.getFile()), YamlRootConfiguration.class);
-        ShardingRuleConfiguration shardingRuleConfig = 
ShardingRuleConfigurationConverter.findAndConvertShardingRuleConfiguration(yamlRootConfig.getRules())
-                .orElseThrow(ShardingRuleNotFoundException::new);
-        return new ShardingRule(shardingRuleConfig, Maps.of("ds_1", new 
MockedDataSource(), "ds_2", new MockedDataSource(), "ds_3", new 
MockedDataSource()), mock(InstanceContext.class));
+        Optional<ShardingRuleConfiguration> shardingRuleConfig = 
ShardingRuleConfigurationConverter.findAndConvertShardingRuleConfiguration(yamlRootConfig.getRules());
+        assertTrue(shardingRuleConfig.isPresent());
+        return new ShardingRule(shardingRuleConfig.get(), Maps.of("ds_1", new 
MockedDataSource(), "ds_2", new MockedDataSource(), "ds_3", new 
MockedDataSource()), mock(InstanceContext.class));
     }
     
     private void assertOrder(final ShardingRule rule) throws SQLException {

Reply via email to