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

Julian Hyde updated CALCITE-5369:
---------------------------------
    Description: 
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 '1903-12-31'}} 
(because 1903-01-01 is a Thursday)

  was:In Avatica DateTimeUtils, add support for computing the FLOOR and CEIL of 
a date to ISOYEAR.


> 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
>            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 '1903-12-31'}} 
> (because 1903-01-01 is a Thursday)



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

Reply via email to