morrySnow commented on code in PR #13216: URL: https://github.com/apache/doris/pull/13216#discussion_r990880286
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJoin.java: ########## @@ -45,8 +45,10 @@ public class LogicalJoin<LEFT_CHILD_TYPE extends Plan, RIGHT_CHILD_TYPE extends Plan> extends LogicalBinary<LEFT_CHILD_TYPE, RIGHT_CHILD_TYPE> implements Join { + public static final List<Expression> EMPTY_LIST = ImmutableList.of(); Review Comment: ```suggestion public static final List<Expression> EMPTY_CONDITIONS = ImmutableList.of(); ``` ########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/MultiJoin.java: ########## @@ -133,8 +133,8 @@ private Plan reorderJoinsAccordingToConditions(List<Plan> joinInputs, List<Expre conjuncts); List<Expression> joinConditions = pair.first; List<Expression> nonJoinConditions = pair.second; - LogicalJoin join = new LogicalJoin<>(JoinType.INNER_JOIN, new ArrayList<>(), - ExpressionUtils.optionalAnd(joinConditions), + LogicalJoin join = new LogicalJoin<>(JoinType.INNER_JOIN, LogicalJoin.EMPTY_LIST, + joinConditions, left, right); Review Comment: ```suggestion joinConditions, left, right); ``` ########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJoin.java: ########## @@ -45,8 +45,10 @@ public class LogicalJoin<LEFT_CHILD_TYPE extends Plan, RIGHT_CHILD_TYPE extends Plan> extends LogicalBinary<LEFT_CHILD_TYPE, RIGHT_CHILD_TYPE> implements Join { + public static final List<Expression> EMPTY_LIST = ImmutableList.of(); Review Comment: btw, we could move it to expression utils since it is general enough ########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJoin.java: ########## @@ -58,28 +60,39 @@ * @param joinType logical type for join */ public LogicalJoin(JoinType joinType, LEFT_CHILD_TYPE leftChild, RIGHT_CHILD_TYPE rightChild) { - this(joinType, ImmutableList.of(), - Optional.empty(), Optional.empty(), + this(joinType, ImmutableList.of(), EMPTY_LIST, Optional.empty(), Review Comment: ```suggestion this(joinType, EMPTY_CONDITIONS, EMPTY_CONDITIONS, Optional.empty(), ``` -- 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