feiniaofeiafei commented on code in PR #69828:
URL: https://github.com/apache/doris/pull/69828#discussion_r4453859516


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/OneRangePartitionEvaluator.java:
##########
@@ -1039,7 +1041,9 @@ private EvaluateRangeResult 
computeMonotonicFunctionRange(EvaluateRangeResult re
         Literal lower = span.hasLowerBound() ? span.lowerEndpoint().getValue() 
: null;
         Literal upper = span.hasUpperBound() && 
!(span.upperEndpoint().getValue() instanceof MaxLiteral)
                 ? span.upperEndpoint().getValue() : null;
-        if (!func.isMonotonic(lower, upper)) {
+        boolean monotonic = func.isMonotonic(lower, upper);
+        if (!monotonic && !(func instanceof CalendarAddSubMonotonic

Review Comment:
   !(func instanceof CalendarAddSubMonotonic
                   && ((CalendarAddSubMonotonic) func).canEvaluateRange())   
put this in  isMonotonic is better choice?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to