[ https://issues.apache.org/jira/browse/PHOENIX-6822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Istvan Toth updated PHOENIX-6822: --------------------------------- Description: 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, and hours the implementation is very arbitrary, using the number of days/hours since epoch as a basis for the integer division function (as opposed to day of week, month, year etc. or hour of day) was: 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, and hours the implementation is very arbitrary, using the number of days/hours since epoch as a basis for the integer division function (as opposed to day of week, month, year etc. or hour of day) The rounding for seconds 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). > 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 > Priority: Major > > 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, and hours the implementation is very arbitrary, using the > number of days/hours since epoch as a basis for the integer division function > (as opposed to day of week, month, year etc. or hour of day) > -- This message was sent by Atlassian Jira (v8.20.10#820010)