Istvan Toth created PHOENIX-6822:
------------------------------------

             Summary: Multiplier for Temporal round/floor/ceiling functions is 
not implemented and/or poorly defined
                 Key: PHOENIX-6822
                 URL: https://issues.apache.org/jira/browse/PHOENIX-6822
             Project: Phoenix
          Issue Type: Bug
            Reporter: Istvan Toth


We are defining a multiplier parameter for the round/floor/ceil functions for 
temporal values.

[https://phoenix.apache.org/language/functions.html#trunc]

However, we only actually use that parameter for days, hours, minutes and 
seconds, but ignore them for weeks, months and years.

(weeks, months, and years are not mentioned in the documentation)

Even for days, the implementation is very arbitrary, using the number of days 
since epoch as a basis for the integer division function (as opposed to day of 
week, month, year etc.)

The rounding for seconds, hours and minutes does what one would expect, 
relative to the start of the day. (Actually, relative to the epoch, but it 
works out the same).

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to