englefly commented on code in PR #45081: URL: https://github.com/apache/doris/pull/45081#discussion_r1872529148
########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/SimplifyRange.java: ########## @@ -548,6 +763,7 @@ public Expression toExpression() { return toExpr; } Expression result = sourceValues.get(0).toExpression(); + BinaryOperator<Expression> mergeExprOp = isAnd ? ExpressionUtils::and : ExpressionUtils::or; for (int i = 1; i < sourceValues.size(); i++) { result = mergeExprOp.apply(result, sourceValues.get(i).toExpression()); Review Comment: avoid to generate deep tree list = new List(result); for (int i = 1; i < sourceValues.size(); i++) { list.add(sourceValues.get(i).toExpression()) } result = new And(list); -- 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