JNSimba commented on code in PR #208:
URL: 
https://github.com/apache/doris-flink-connector/pull/208#discussion_r1361567370


##########
flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/DatabaseSync.java:
##########
@@ -235,12 +250,35 @@ protected boolean isSyncNeeded(String tableName) {
         LOG.debug("table {} is synchronized? {}", tableName, sync);
         return sync;
     }
+    /**
+     * Filter table that many tables merge to one
+     */
+    protected HashMap<Pattern,String> multiToOneRulesParser(String 
multiToOneOrigin,String multiToOneTarget){
+        if(multiToOneOrigin==null || multiToOneTarget==null){
+            return null;
+        }
+        HashMap<Pattern,String> multiToOneRulesPattern= new HashMap<>();
+        String[] origins = multiToOneOrigin.split("\\|");
+        String[] targets = multiToOneTarget.split("\\|");
+        if(origins.length!=targets.length){
+            System.out.println("param error : multi to one params length are 
not equal,please check your params.");
+            System.exit(1);
+        }
+        for (int i = 0; i < origins.length; i++) {
+            multiToOneRulesPattern.put(Pattern.compile(origins[i]),targets[i]);
+        }
+        return multiToOneRulesPattern;
+    }

Review Comment:
   This method recommends adding a unit test



-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to