Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5678

Calcite should reject date literals not satisfying Gregorian calendar, per SQL standard

    XMLWordPrintableJSON

Details

    Description

      RexToLixTranslator now process datetime input\output string representation through transformation between gregorian and julian [1] calendars , thus no exception is raised if incorrect string is passed, just smart transformation instead.

      [1] org.apache.calcite.avatica.util.DateTimeUtils#timestampStringToUnixDate

      create table t (i int not null, j timestamp);
      insert into t values (1, '2013-20-14 00:00:00');
      select * from t;
      
      > +---+---------------------+
      > | I | J                   |
      > +---+---------------------+
      > | 1 | 2014-08-16 00:00:00 |
      > +---+---------------------+

      Attachments

        Issue Links

          Activity

            People

              zstan Evgeny Stanilovsky
              zstan Evgeny Stanilovsky
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m