You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "xuzifu666 (via GitHub)" <gi...@apache.org> on 2025/12/01 02:08:16 UTC
Re: [PR] [CALCITE-7304] Floor/Ceil can not simplify with WEEK TimeUnit [calcite]
xuzifu666 commented on code in PR #4651:
URL: https://github.com/apache/calcite/pull/4651#discussion_r2575428140
##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -2671,6 +2673,12 @@ private static boolean canRollUp(TimeUnit outer, TimeUnit inner) {
if (inner == TimeUnit.QUARTER) {
return outer == TimeUnit.YEAR;
}
+ if (outer == TimeUnit.WEEK && inner != TimeUnit.YEAR && inner != TimeUnit.MONTH) {
Review Comment:
Yes,I also noticed this historical code. Since there were no issues involving it, I didn't modify it, and this shouldn't cause any problems.
--
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-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org