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

Julian Hyde commented on CALCITE-2496:
--------------------------------------

I didn't know that {{FLOOR(... TO MILLISECOND)}} rounds to seconds. If the 
timestamp or time has a scale less than 3 then it should return the value 
unchanged. Ditto floor and ceil of microseconds and nanoseconds. I think it 
would be OK if it just returned the value unchanged, regardless of scale. (Yes, 
I know this is broken. Someone can take the time to fix if it's important to 
them.) Add tests to {{testFloorFuncDateTime}} and {{testCeilFuncDateTime}} in 
{{SqlOperatorBaseTest}}.

> EXTRACT function: MILLI/MICRO/NANOSECOND parts of a DATE must be zero
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-2496
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2496
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Sergey Nuyanzin
>            Assignee: Julian Hyde
>            Priority: Major
>
> There was already a similar issue CALCITE-2324 but I'm sorry I did not take 
> into account 3 time units. Now I want to cover them here. So all existing 
> Timeunits from {{org.apache.calcite.avatica.util.TimeUnit}} which are less 
> than a day will be covered



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

Reply via email to