wangshuo128 commented on code in PR #10479:
URL: https://github.com/apache/doris/pull/10479#discussion_r920970186


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/Utils.java:
##########
@@ -32,4 +44,115 @@ public static String quoteIfNeeded(String part) {
         return part.matches("\\w*[\\w&&[^\\d]]+\\w*")
                 ? part : part.replace("`", "``");
     }
+
+    /**
+     * Split predicates with `And` form recursively.
+     * <p>
+     * Some examples:
+     * a and b -> a, b
+     * (a and b) and c -> a, b, c
+     * (a or b) and (c and d) -> (a or b), c , d
+     * <p>
+     * Stop recursion when meeting `Or`, so this func will ignore `And` inside 
`Or`.
+     * Warning examples:
+     * (a and b) or c -> (a and b) or c
+     */
+    public static List<Expression> extractConjunctive(Expression expr) {

Review Comment:
   It's duplicated with `ExpressionUtils.extractConjunct`.



-- 
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