RaigorJiang commented on code in PR #23086:
URL: https://github.com/apache/shardingsphere/pull/23086#discussion_r1056905955


##########
features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/update/CreateShadowRuleStatementUpdater.java:
##########
@@ -66,17 +68,23 @@ private void updateTables(final Map<String, 
ShadowTableConfiguration> currentTab
     public void checkSQLStatement(final ShardingSphereDatabase database, final 
CreateShadowRuleStatement sqlStatement, final ShadowRuleConfiguration 
currentRuleConfig) {
         String databaseName = database.getName();
         Collection<ShadowRuleSegment> rules = sqlStatement.getRules();
-        checkRuleNames(databaseName, rules, currentRuleConfig);
+        checkRuleNames(databaseName, sqlStatement, currentRuleConfig);
         checkResources(database, rules);
-        checkAlgorithms(databaseName, sqlStatement.getRules());
-        checkAlgorithmType(sqlStatement);
+        checkAlgorithms(databaseName, rules);
+        checkAlgorithmType(rules);
     }
     
-    private void checkRuleNames(final String databaseName, final 
Collection<ShadowRuleSegment> rules, final ShadowRuleConfiguration 
currentRuleConfig) {
-        Collection<String> requireRuleNames = 
ShadowRuleStatementSupporter.getRuleNames(rules);
+    private void checkRuleNames(final String databaseName, final 
CreateShadowRuleStatement sqlStatement, final ShadowRuleConfiguration 
currentRuleConfig) {
+        Collection<String> requireRuleNames = 
ShadowRuleStatementSupporter.getRuleNames(sqlStatement.getRules());

Review Comment:
   Does the requireRuleNames mean toBeCreatedRuleNames?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to