Julian Hyde created CALCITE-5629:
------------------------------------

             Summary: In TimestampString, allow negative years and years with 
more than 4 digits
                 Key: CALCITE-5629
                 URL: https://issues.apache.org/jira/browse/CALCITE-5629
             Project: Calcite
          Issue Type: Bug
            Reporter: Julian Hyde


In {{TimestampString}}, allow negative years, and years with more than 4 digits.

Per [ISO 8601|https://en.wikipedia.org/wiki/ISO_8601#Years], 0000 means 1 BC, 
-0001 means 2 BC, etc.

In the canonical form, years will have at least 4 digits. If they have more 
than 4 digits they must not start with zero.

The implementation should be sure to test conversion of negative timestamp 
values to and from {{java.util.Calendar}} (which probably represents BC dates 
using {{Calendar.ERA}} field). {{TimestampString}} currently assumes that 
digits 0..3 are year, 5..6 are month, etc., and the point is at position 20, so 
many functions will need to be re-tested.



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

Reply via email to