You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Pace2Car (via GitHub)" <gi...@apache.org> on 2023/04/12 07:18:16 UTC

[GitHub] [shardingsphere] Pace2Car commented on a diff in pull request #25132: Add checkDuplicatedWithLogicalDataSource for ShadowRuleStatementChecker

Pace2Car commented on code in PR #25132:
URL: https://github.com/apache/shardingsphere/pull/25132#discussion_r1163722744


##########
features/shadow/distsql/handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/checker/ShadowRuleStatementChecker.java:
##########
@@ -115,4 +119,24 @@ private static Collection<String> getDuplicated(final Collection<String> require
     private static Collection<String> getNotExisted(final Collection<String> required, final Collection<String> current) {
         return required.stream().filter(each -> !current.contains(each)).collect(Collectors.toSet());
     }
+    
+    /**
+     * Check if there are duplicated with logical data sources.
+     * 
+     * @param toBeCreatedRuleNames rule names
+     * @param database ShardingSphere database
+     */
+    public static void checkDuplicatedWithLogicDataSource(final Collection<String> toBeCreatedRuleNames, final ShardingSphereDatabase database) {
+        Collection<String> logicDataSources = getLogicDataSources(database);
+        if (null != logicDataSources && !logicDataSources.isEmpty()) {

Review Comment:
   Resolved, THX



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org