[ 
https://issues.apache.org/jira/browse/CALCITE-2178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16365106#comment-16365106
 ] 

Jesus Camacho Rodriguez commented on CALCITE-2178:
--------------------------------------------------

Thanks for the feedback [~julianhyde], I have updated the PR, could you take a 
look? Weeks should not be there indeed. I have rewritten the logic to use 
{{TimeUnit}} and I have added a method {{canRollUp}} that accounts for the fact 
that {{QUARTER}} is not in order in the enumeration.

> Extend expression simplifier to work on datetime FLOOR functions
> ----------------------------------------------------------------
>
>                 Key: CALCITE-2178
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2178
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>             Fix For: 1.16.0
>
>
> Extend expression simplifier to support:
> {code}
> FLOOR(FLOOR(CAST( '2010-01-10 00:00:00' AS TIMESTAMP) TO HOUR) TO DAY) => 
> FLOOR(CAST( '2010-01-10 00:00:00' AS TIMESTAMP) TO DAY)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to