[ 
https://issues.apache.org/jira/browse/CALCITE-5369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde resolved CALCITE-5369.
----------------------------------
    Resolution: Fixed

Fixed in 
[d9a2e105|https://github.com/apache/calcite-avatica/commit/d9a2e105a906e9334ca4603d658d6adedb863e88].

Thanks for the review [~Sergey Nuyanzin]! The other commit you noticed in the 
PR was a commit that was already on main branch but with a slightly different 
commit message.

> In Avatica DateTimeUtils, add support for FLOOR and CEIL to ISOYEAR
> -------------------------------------------------------------------
>
>                 Key: CALCITE-5369
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5369
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>            Priority: Major
>             Fix For: avatica-1.23.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In Avatica DateTimeUtils, add support for computing the FLOOR and CEIL of a 
> date to ISOYEAR.
> For example:
> * {{FLOOR(DATE '1900-01-01' TO ISOYEAR)}} should return {{DATE '1900-01-01'}} 
> (because 1900-01-01 is a Monday and an ISO year starts on a Monday)
> * {{FLOOR(DATE '1901-01-01' TO ISOYEAR)}} should return {{DATE '1900-12-31'}} 
> (because 1901-01-01 is a Tuesday and 1900-12-31 is the preceding Monday)
> * {{FLOOR(DATE '1903-01-01' TO ISOYEAR)}} should return {{DATE '1902-12-29'}} 
> (because 1903-01-01 is a Thursday and 1902-12-29 is the nearest Monday)
> * {{FLOOR(DATE '1904-01-01' TO ISOYEAR)}} should return {{DATE '1902-12-29'}} 
> (because 1904-01-01 is a Friday, 1904-01-04 is start of the next ISO year, 
> but 1904-01-01 falls into the previous ISO year)
> * {{FLOOR(DATE '1906-01-01' TO ISOYEAR)}} should return {{DATE '1906-01-01'}} 
> (because 1906-01-01 is a Monday, therefore the start of an ISO year)



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

Reply via email to