diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/OneRangePartitionEvaluator.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/OneRangePartitionEvaluator.java index e605b71d22fb498..eb9fd6e149160ba 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/OneRangePartitionEvaluator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/OneRangePartitionEvaluator.java @@ -801,9 +801,6 @@ private EvaluateRangeResult computeMonotonicFunctionRange(EvaluateRangeResult re return new EvaluateRangeResult((Expression) func, ImmutableMap.of((Expression) func, context.rangeMap.get(func)), result.childrenResult); } - if (!func.isMonotonic()) { - return result; - } int childIndex = func.getMonotonicFunctionChildIndex(); Expression funcChild = func.child(childIndex); boolean isNullable = partitionSlotContainsNull.getOrDefault(funcChild, true); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/DateFormat.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/DateFormat.java index 4c409d431c9ccc8..972c0c8aec709f7 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/DateFormat.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/DateFormat.java @@ -23,6 +23,7 @@ import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature; import org.apache.doris.nereids.trees.expressions.functions.Monotonic; import org.apache.doris.nereids.trees.expressions.functions.PropagateNullLiteral; +import org.apache.doris.nereids.trees.expressions.literal.Literal; import org.apache.doris.nereids.trees.expressions.literal.VarcharLiteral; import org.apache.doris.nereids.trees.expressions.shape.BinaryExpression; import org.apache.doris.nereids.trees.expressions.visitor.ExpressionVisitor; @@ -84,7 +85,7 @@ public R accept(ExpressionVisitor visitor, C context) { } @Override - public boolean isMonotonic() { + public boolean isMonotonic(Literal lower, Literal upper) { Expression format = child(1); if (!(format instanceof VarcharLiteral)) { return false;