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

duanzhengqiang 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 de28a9ea437 Rename MissingRequiredAlgorithmException (#31022)
de28a9ea437 is described below

commit de28a9ea437ea315ec07882291a0e97229a4aa39
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Apr 26 14:25:52 2024 +0800

    Rename MissingRequiredAlgorithmException (#31022)
    
    * Rename dataSourceRuleGroupConfig to dataSourceGroupRuleConfig
    
    * Rename MissingRequiredAlgorithmException
---
 .../encrypt/checker/EncryptRuleConfigurationChecker.java          | 8 ++++----
 .../shadow/checker/ShadowRuleConfigurationChecker.java            | 6 +++---
 .../handler/update/AlterDefaultShadowAlgorithmExecutor.java       | 4 ++--
 .../handler/update/CreateDefaultShadowAlgorithmExecutor.java      | 4 ++--
 .../distsql/update/AlterDefaultShadowAlgorithmExecutorTest.java   | 4 ++--
 .../handler/update/AlterDefaultShardingStrategyExecutor.java      | 4 ++--
 .../handler/update/CreateDefaultShardingStrategyExecutor.java     | 4 ++--
 .../distsql/update/AlterDefaultShardingStrategyExecutorTest.java  | 4 ++--
 .../distsql/update/CreateDefaultShardingStrategyExecutorTest.java | 4 ++--
 ...rithmException.java => MissingRequiredAlgorithmException.java} | 6 +++---
 .../handler/distsql/ral/updatable/LockClusterExecutor.java        | 4 ++--
 11 files changed, 26 insertions(+), 26 deletions(-)

diff --git 
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/checker/EncryptRuleConfigurationChecker.java
 
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/checker/EncryptRuleConfigurationChecker.java
index a31571339e3..a5dd3bd04bd 100644
--- 
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/checker/EncryptRuleConfigurationChecker.java
+++ 
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/checker/EncryptRuleConfigurationChecker.java
@@ -25,7 +25,7 @@ import 
org.apache.shardingsphere.encrypt.constant.EncryptOrder;
 import 
org.apache.shardingsphere.encrypt.exception.metadata.MissingRequiredEncryptColumnException;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
 import 
org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration;
-import 
org.apache.shardingsphere.infra.algorithm.core.exception.EmptyAlgorithmException;
+import 
org.apache.shardingsphere.infra.algorithm.core.exception.MissingRequiredAlgorithmException;
 import 
org.apache.shardingsphere.infra.algorithm.core.exception.UnregisteredAlgorithmException;
 import 
org.apache.shardingsphere.infra.config.rule.checker.RuleConfigurationChecker;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
@@ -72,7 +72,7 @@ public final class EncryptRuleConfigurationChecker implements 
RuleConfigurationC
         ShardingSpherePreconditions.checkNotEmpty(cipherColumnConfig.getName(),
                 () -> new MissingRequiredEncryptColumnException("Cipher", new 
SQLExceptionIdentifier(databaseName, tableName, logicColumnName)));
         
ShardingSpherePreconditions.checkNotEmpty(cipherColumnConfig.getEncryptorName(),
-                () -> new EmptyAlgorithmException("Standard encrypt", new 
SQLExceptionIdentifier(databaseName, tableName, logicColumnName)));
+                () -> new MissingRequiredAlgorithmException("Standard 
encrypt", new SQLExceptionIdentifier(databaseName, tableName, 
logicColumnName)));
         ShardingSpherePreconditions.checkContainsKey(encryptors, 
cipherColumnConfig.getEncryptorName(),
                 () -> new UnregisteredAlgorithmException("Standard encrypt", 
cipherColumnConfig.getEncryptorName(), new SQLExceptionIdentifier(databaseName, 
tableName, logicColumnName)));
     }
@@ -82,7 +82,7 @@ public final class EncryptRuleConfigurationChecker implements 
RuleConfigurationC
         
ShardingSpherePreconditions.checkNotEmpty(assistedQueryColumnConfig.getName(),
                 () -> new MissingRequiredEncryptColumnException("Assisted 
query", new SQLExceptionIdentifier(databaseName, tableName, logicColumnName)));
         
ShardingSpherePreconditions.checkNotEmpty(assistedQueryColumnConfig.getEncryptorName(),
-                () -> new EmptyAlgorithmException("Assist query encrypt", new 
SQLExceptionIdentifier(databaseName, tableName, logicColumnName)));
+                () -> new MissingRequiredAlgorithmException("Assist query 
encrypt", new SQLExceptionIdentifier(databaseName, tableName, 
logicColumnName)));
         ShardingSpherePreconditions.checkContainsKey(encryptors, 
assistedQueryColumnConfig.getEncryptorName(),
                 () -> new UnregisteredAlgorithmException("Assist query 
encrypt", assistedQueryColumnConfig.getEncryptorName(), new 
SQLExceptionIdentifier(databaseName, tableName, logicColumnName)));
     }
@@ -92,7 +92,7 @@ public final class EncryptRuleConfigurationChecker implements 
RuleConfigurationC
         
ShardingSpherePreconditions.checkNotEmpty(likeQueryColumnConfig.getName(),
                 () -> new MissingRequiredEncryptColumnException("Like", new 
SQLExceptionIdentifier(databaseName, tableName, logicColumnName)));
         
ShardingSpherePreconditions.checkNotEmpty(likeQueryColumnConfig.getEncryptorName(),
-                () -> new EmptyAlgorithmException("Like query", new 
SQLExceptionIdentifier(databaseName, tableName, logicColumnName)));
+                () -> new MissingRequiredAlgorithmException("Like query", new 
SQLExceptionIdentifier(databaseName, tableName, logicColumnName)));
         ShardingSpherePreconditions.checkContainsKey(encryptors, 
likeQueryColumnConfig.getEncryptorName(),
                 () -> new UnregisteredAlgorithmException("Like query encrypt", 
likeQueryColumnConfig.getEncryptorName(), new 
SQLExceptionIdentifier(databaseName, tableName, logicColumnName)));
     }
diff --git 
a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/checker/ShadowRuleConfigurationChecker.java
 
b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/checker/ShadowRuleConfigurationChecker.java
index 429ae997afa..328c58774d4 100644
--- 
a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/checker/ShadowRuleConfigurationChecker.java
+++ 
b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/checker/ShadowRuleConfigurationChecker.java
@@ -18,7 +18,7 @@
 package org.apache.shardingsphere.shadow.checker;
 
 import 
org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration;
-import 
org.apache.shardingsphere.infra.algorithm.core.exception.EmptyAlgorithmException;
+import 
org.apache.shardingsphere.infra.algorithm.core.exception.MissingRequiredAlgorithmException;
 import 
org.apache.shardingsphere.infra.config.rule.checker.RuleConfigurationChecker;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.identifier.SQLExceptionIdentifier;
@@ -83,9 +83,9 @@ public final class ShadowRuleConfigurationChecker implements 
RuleConfigurationCh
     
     private void checkShadowTableAlgorithmsReferences(final Map<String, 
ShadowTableConfiguration> shadowTables, final Map<String, 
AlgorithmConfiguration> shadowAlgorithms, final String databaseName) {
         for (ShadowTableConfiguration each : shadowTables.values()) {
-            
ShardingSpherePreconditions.checkNotEmpty(each.getShadowAlgorithmNames(), () -> 
new EmptyAlgorithmException("Shadow", new 
SQLExceptionIdentifier(databaseName)));
+            
ShardingSpherePreconditions.checkNotEmpty(each.getShadowAlgorithmNames(), () -> 
new MissingRequiredAlgorithmException("Shadow", new 
SQLExceptionIdentifier(databaseName)));
             each.getShadowAlgorithmNames().forEach(shadowAlgorithmName -> 
ShardingSpherePreconditions.checkContainsKey(shadowAlgorithms, 
shadowAlgorithmName,
-                    () -> new EmptyAlgorithmException("Shadow", new 
SQLExceptionIdentifier(databaseName))));
+                    () -> new MissingRequiredAlgorithmException("Shadow", new 
SQLExceptionIdentifier(databaseName))));
         }
     }
     
diff --git 
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterDefaultShadowAlgorithmExecutor.java
 
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterDefaultShadowAlgorithmExecutor.java
index 3bf159eeab0..ff4d0448875 100644
--- 
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterDefaultShadowAlgorithmExecutor.java
+++ 
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/AlterDefaultShadowAlgorithmExecutor.java
@@ -22,7 +22,7 @@ import 
org.apache.shardingsphere.distsql.handler.engine.update.rdl.rule.spi.data
 import 
org.apache.shardingsphere.distsql.handler.required.DistSQLExecutorCurrentRuleRequired;
 import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
 import 
org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration;
-import 
org.apache.shardingsphere.infra.algorithm.core.exception.EmptyAlgorithmException;
+import 
org.apache.shardingsphere.infra.algorithm.core.exception.MissingRequiredAlgorithmException;
 import 
org.apache.shardingsphere.infra.algorithm.core.exception.UnregisteredAlgorithmException;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.identifier.SQLExceptionIdentifier;
@@ -63,7 +63,7 @@ public final class AlterDefaultShadowAlgorithmExecutor 
implements DatabaseRuleAl
     }
     
     private void checkAlgorithmCompleteness(final AlgorithmSegment 
algorithmSegment) {
-        ShardingSpherePreconditions.checkNotEmpty(algorithmSegment.getName(), 
() -> new EmptyAlgorithmException("Shadow", new SQLExceptionIdentifier("")));
+        ShardingSpherePreconditions.checkNotEmpty(algorithmSegment.getName(), 
() -> new MissingRequiredAlgorithmException("Shadow", new 
SQLExceptionIdentifier("")));
     }
     
     private void checkAlgorithmType(final AlgorithmSegment algorithmSegment) {
diff --git 
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/CreateDefaultShadowAlgorithmExecutor.java
 
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/CreateDefaultShadowAlgorithmExecutor.java
index 8e3e6b6c27d..b4ae0077e47 100644
--- 
a/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/CreateDefaultShadowAlgorithmExecutor.java
+++ 
b/features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/CreateDefaultShadowAlgorithmExecutor.java
@@ -22,7 +22,7 @@ import 
org.apache.shardingsphere.distsql.handler.engine.update.rdl.rule.spi.data
 import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
 import 
org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration;
 import 
org.apache.shardingsphere.infra.algorithm.core.exception.InUsedAlgorithmException;
-import 
org.apache.shardingsphere.infra.algorithm.core.exception.EmptyAlgorithmException;
+import 
org.apache.shardingsphere.infra.algorithm.core.exception.MissingRequiredAlgorithmException;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.identifier.SQLExceptionIdentifier;
 import 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
@@ -61,7 +61,7 @@ public final class CreateDefaultShadowAlgorithmExecutor 
implements DatabaseRuleC
     
     private void checkAlgorithmCompleteness(final 
CreateDefaultShadowAlgorithmStatement sqlStatement) {
         
ShardingSpherePreconditions.checkNotEmpty(sqlStatement.getShadowAlgorithmSegment().getAlgorithmSegment().getName(),
-                () -> new EmptyAlgorithmException("Shadow", new 
SQLExceptionIdentifier(database.getName())));
+                () -> new MissingRequiredAlgorithmException("Shadow", new 
SQLExceptionIdentifier(database.getName())));
     }
     
     private void checkAlgorithmType(final 
CreateDefaultShadowAlgorithmStatement sqlStatement) {
diff --git 
a/features/shadow/distsql/handler/src/test/java/org/apache/shardingsphere/shadow/distsql/update/AlterDefaultShadowAlgorithmExecutorTest.java
 
b/features/shadow/distsql/handler/src/test/java/org/apache/shardingsphere/shadow/distsql/update/AlterDefaultShadowAlgorithmExecutorTest.java
index 7eeff463f53..d9925a4eb87 100644
--- 
a/features/shadow/distsql/handler/src/test/java/org/apache/shardingsphere/shadow/distsql/update/AlterDefaultShadowAlgorithmExecutorTest.java
+++ 
b/features/shadow/distsql/handler/src/test/java/org/apache/shardingsphere/shadow/distsql/update/AlterDefaultShadowAlgorithmExecutorTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.shadow.distsql.update;
 
 import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
 import 
org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration;
-import 
org.apache.shardingsphere.infra.algorithm.core.exception.EmptyAlgorithmException;
+import 
org.apache.shardingsphere.infra.algorithm.core.exception.MissingRequiredAlgorithmException;
 import 
org.apache.shardingsphere.infra.algorithm.core.exception.UnregisteredAlgorithmException;
 import 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import 
org.apache.shardingsphere.infra.spi.exception.ServiceProviderNotFoundException;
@@ -80,7 +80,7 @@ class AlterDefaultShadowAlgorithmExecutorTest {
     void assertExecuteIncompletenessAlgorithm() {
         AlterDefaultShadowAlgorithmStatement sqlStatement = new 
AlterDefaultShadowAlgorithmStatement(
                 new ShadowAlgorithmSegment("default_shadow_algorithm", new 
AlgorithmSegment("", PropertiesBuilder.build(new Property("type", "value")))));
-        assertThrows(EmptyAlgorithmException.class, () -> 
executor.checkBeforeUpdate(sqlStatement));
+        assertThrows(MissingRequiredAlgorithmException.class, () -> 
executor.checkBeforeUpdate(sqlStatement));
     }
     
     @Test
diff --git 
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterDefaultShardingStrategyExecutor.java
 
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterDefaultShardingStrategyExecutor.java
index b0f3ba10374..d7834d2c1a3 100644
--- 
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterDefaultShardingStrategyExecutor.java
+++ 
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterDefaultShardingStrategyExecutor.java
@@ -22,7 +22,7 @@ import 
org.apache.shardingsphere.distsql.handler.engine.update.rdl.rule.spi.data
 import 
org.apache.shardingsphere.distsql.handler.required.DistSQLExecutorCurrentRuleRequired;
 import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
 import 
org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration;
-import 
org.apache.shardingsphere.infra.algorithm.core.exception.EmptyAlgorithmException;
+import 
org.apache.shardingsphere.infra.algorithm.core.exception.MissingRequiredAlgorithmException;
 import 
org.apache.shardingsphere.infra.algorithm.core.exception.InvalidAlgorithmConfigurationException;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.identifier.SQLExceptionIdentifier;
@@ -62,7 +62,7 @@ public final class AlterDefaultShardingStrategyExecutor 
implements DatabaseRuleA
         
ShardingSpherePreconditions.checkState(ShardingStrategyType.isValidType(sqlStatement.getStrategyType()),
 () -> new 
InvalidAlgorithmConfigurationException(sqlStatement.getStrategyType()));
         
ShardingSpherePreconditions.checkState(ShardingStrategyType.getValueOf(sqlStatement.getStrategyType()).isValid(sqlStatement.getShardingColumn()),
                 () -> new 
InvalidAlgorithmConfigurationException(sqlStatement.getStrategyType()));
-        
ShardingSpherePreconditions.checkState(isAlgorithmDefinitionExists(sqlStatement),
 () -> new EmptyAlgorithmException("Sharding", new SQLExceptionIdentifier("")));
+        
ShardingSpherePreconditions.checkState(isAlgorithmDefinitionExists(sqlStatement),
 () -> new MissingRequiredAlgorithmException("Sharding", new 
SQLExceptionIdentifier("")));
     }
     
     private boolean isAlgorithmDefinitionExists(final 
AlterDefaultShardingStrategyStatement sqlStatement) {
diff --git 
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateDefaultShardingStrategyExecutor.java
 
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateDefaultShardingStrategyExecutor.java
index d5b4fab3414..50f4d579f92 100644
--- 
a/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateDefaultShardingStrategyExecutor.java
+++ 
b/features/sharding/distsql/handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateDefaultShardingStrategyExecutor.java
@@ -21,7 +21,7 @@ import lombok.Setter;
 import 
org.apache.shardingsphere.distsql.handler.engine.update.rdl.rule.spi.database.DatabaseRuleCreateExecutor;
 import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
 import 
org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration;
-import 
org.apache.shardingsphere.infra.algorithm.core.exception.EmptyAlgorithmException;
+import 
org.apache.shardingsphere.infra.algorithm.core.exception.MissingRequiredAlgorithmException;
 import 
org.apache.shardingsphere.infra.algorithm.core.exception.InvalidAlgorithmConfigurationException;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.identifier.SQLExceptionIdentifier;
@@ -62,7 +62,7 @@ public final class CreateDefaultShardingStrategyExecutor 
implements DatabaseRule
         
ShardingSpherePreconditions.checkState(ShardingStrategyType.isValidType(sqlStatement.getStrategyType()),
 () -> new 
InvalidAlgorithmConfigurationException(sqlStatement.getStrategyType()));
         
ShardingSpherePreconditions.checkState(ShardingStrategyType.getValueOf(sqlStatement.getStrategyType())
                 .isValid(sqlStatement.getShardingColumn()), () -> new 
InvalidAlgorithmConfigurationException(sqlStatement.getStrategyType()));
-        
ShardingSpherePreconditions.checkNotNull(sqlStatement.getAlgorithmSegment(), () 
-> new EmptyAlgorithmException("Sharding", new SQLExceptionIdentifier("")));
+        
ShardingSpherePreconditions.checkNotNull(sqlStatement.getAlgorithmSegment(), () 
-> new MissingRequiredAlgorithmException("Sharding", new 
SQLExceptionIdentifier("")));
     }
     
     private void checkExist(final CreateDefaultShardingStrategyStatement 
sqlStatement) {
diff --git 
a/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/AlterDefaultShardingStrategyExecutorTest.java
 
b/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/AlterDefaultShardingStrategyExecutorTest.java
index d40e28bbdf9..5ad07ed5507 100644
--- 
a/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/AlterDefaultShardingStrategyExecutorTest.java
+++ 
b/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/AlterDefaultShardingStrategyExecutorTest.java
@@ -18,7 +18,7 @@
 package org.apache.shardingsphere.sharding.distsql.update;
 
 import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
-import 
org.apache.shardingsphere.infra.algorithm.core.exception.EmptyAlgorithmException;
+import 
org.apache.shardingsphere.infra.algorithm.core.exception.MissingRequiredAlgorithmException;
 import 
org.apache.shardingsphere.infra.algorithm.core.exception.InvalidAlgorithmConfigurationException;
 import 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
 import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
@@ -70,7 +70,7 @@ class AlterDefaultShardingStrategyExecutorTest {
         when(rule.getConfiguration()).thenReturn(currentRuleConfig);
         executor.setRule(rule);
         AlterDefaultShardingStrategyStatement sqlStatement = new 
AlterDefaultShardingStrategyStatement("TABLE", "standard", "order_id", null);
-        assertThrows(EmptyAlgorithmException.class, () -> 
executor.checkBeforeUpdate(sqlStatement));
+        assertThrows(MissingRequiredAlgorithmException.class, () -> 
executor.checkBeforeUpdate(sqlStatement));
     }
     
     @Test
diff --git 
a/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/CreateDefaultShardingStrategyExecutorTest.java
 
b/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/CreateDefaultShardingStrategyExecutorTest.java
index 0d00c973a37..402072a89d1 100644
--- 
a/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/CreateDefaultShardingStrategyExecutorTest.java
+++ 
b/features/sharding/distsql/handler/src/test/java/org/apache/shardingsphere/sharding/distsql/update/CreateDefaultShardingStrategyExecutorTest.java
@@ -18,7 +18,7 @@
 package org.apache.shardingsphere.sharding.distsql.update;
 
 import org.apache.shardingsphere.distsql.segment.AlgorithmSegment;
-import 
org.apache.shardingsphere.infra.algorithm.core.exception.EmptyAlgorithmException;
+import 
org.apache.shardingsphere.infra.algorithm.core.exception.MissingRequiredAlgorithmException;
 import 
org.apache.shardingsphere.infra.algorithm.core.exception.InvalidAlgorithmConfigurationException;
 import 
org.apache.shardingsphere.infra.exception.kernel.metadata.rule.DuplicateRuleException;
 import 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
@@ -65,7 +65,7 @@ class CreateDefaultShardingStrategyExecutorTest {
     @Test
     void assertExecuteWithoutAlgorithm() {
         CreateDefaultShardingStrategyStatement statement = new 
CreateDefaultShardingStrategyStatement(false, "TABLE", "standard", "order_id", 
null);
-        assertThrows(EmptyAlgorithmException.class, () -> 
executor.checkBeforeUpdate(statement));
+        assertThrows(MissingRequiredAlgorithmException.class, () -> 
executor.checkBeforeUpdate(statement));
     }
     
     @Test
diff --git 
a/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/EmptyAlgorithmException.java
 
b/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/MissingRequiredAlgorithmException.java
similarity index 83%
rename from 
infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/EmptyAlgorithmException.java
rename to 
infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/MissingRequiredAlgorithmException.java
index 11931c32b3f..ad6a11383ad 100644
--- 
a/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/EmptyAlgorithmException.java
+++ 
b/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/exception/MissingRequiredAlgorithmException.java
@@ -21,13 +21,13 @@ import 
org.apache.shardingsphere.infra.exception.core.external.sql.identifier.SQ
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.sqlstate.XOpenSQLState;
 
 /**
- * Empty algorithm exception.
+ * Missing required algorithm exception.
  */
-public final class EmptyAlgorithmException extends 
AlgorithmDefinitionException {
+public final class MissingRequiredAlgorithmException extends 
AlgorithmDefinitionException {
     
     private static final long serialVersionUID = 8128067899672436211L;
     
-    public EmptyAlgorithmException(final String algorithmType, final 
SQLExceptionIdentifier sqlExceptionIdentifier) {
+    public MissingRequiredAlgorithmException(final String algorithmType, final 
SQLExceptionIdentifier sqlExceptionIdentifier) {
         super(XOpenSQLState.NOT_FOUND, 1, "'%s' algorithm on %s is required.", 
algorithmType, sqlExceptionIdentifier);
     }
 }
diff --git 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterExecutor.java
 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterExecutor.java
index c578ddcaa8e..04982d8ca52 100644
--- 
a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterExecutor.java
+++ 
b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterExecutor.java
@@ -20,7 +20,7 @@ package 
org.apache.shardingsphere.proxy.backend.handler.distsql.ral.updatable;
 import 
org.apache.shardingsphere.distsql.handler.engine.update.DistSQLUpdateExecutor;
 import 
org.apache.shardingsphere.distsql.handler.required.DistSQLExecutorClusterModeRequired;
 import 
org.apache.shardingsphere.distsql.statement.ral.updatable.LockClusterStatement;
-import 
org.apache.shardingsphere.infra.algorithm.core.exception.EmptyAlgorithmException;
+import 
org.apache.shardingsphere.infra.algorithm.core.exception.MissingRequiredAlgorithmException;
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
 import 
org.apache.shardingsphere.infra.exception.core.external.sql.identifier.SQLExceptionIdentifier;
 import org.apache.shardingsphere.infra.lock.GlobalLockNames;
@@ -59,7 +59,7 @@ public final class LockClusterExecutor implements 
DistSQLUpdateExecutor<LockClus
     }
     
     private void checkAlgorithm(final LockClusterStatement sqlStatement) {
-        
ShardingSpherePreconditions.checkNotNull(sqlStatement.getLockStrategy(), () -> 
new EmptyAlgorithmException("Lock", new SQLExceptionIdentifier("")));
+        
ShardingSpherePreconditions.checkNotNull(sqlStatement.getLockStrategy(), () -> 
new MissingRequiredAlgorithmException("Lock", new SQLExceptionIdentifier("")));
         TypedSPILoader.checkService(ClusterLockStrategy.class, 
sqlStatement.getLockStrategy().getName(), 
sqlStatement.getLockStrategy().getProps());
     }
     

Reply via email to