[
https://issues.apache.org/jira/browse/CALCITE-5369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17630285#comment-17630285
]
Sergey Nuyanzin commented on CALCITE-5369:
------------------------------------------
I've checked the mentioned PR
Also tested it a bit with my own tests
It looks ok.
The only thing i noticed that PR contains some other commits not related to
this issue
> 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
>
>
> 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)