foxtail463 commented on code in PR #67182:
URL: https://github.com/apache/doris/pull/67182#discussion_r3893664062
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/MonthCeil.java:
##########
@@ -108,6 +110,15 @@ public RoundingType getRoundingType() {
return RoundingType.CEIL;
}
+ @Override
+ public Optional<Expression> previousBucketBoundary(Literal value) {
+ Optional<Expression> period = regularBucketPeriod();
+ if (!period.isPresent()) {
+ return Optional.empty();
+ }
+ return Optional.of(new MonthsSub(value, period.get()));
Review Comment:
那每个日期函数要自己foldLiteral,比较重复,而且foldLiteral
依赖FoldConstantRuleOnFE,感觉函数部分是不是不能依赖优化器部分?
--
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]