You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Leonard Xu (Jira)" <ji...@apache.org> on 2021/03/27 08:30:00 UTC

[jira] [Updated] (CALCITE-4555) Invalid zero literal value is used for TIMESTAMP WITH LOCAL TIME ZONE type in RexBuilder

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

Leonard Xu updated CALCITE-4555:
--------------------------------
    Description: 
 The zero literal value for TIMESTAMP WITH LOCAL TIME ZONE type is used in `org.apache.calcite.rex.RexBuilder`
{code:java}
    case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
      return new TimestampString(0, 0, 0, 0, 0, 0);
   //TimestampString(int year, int month, int day, int h, int m, int s)
{code}
the month and day should never be zero, I think the zero value should be '1970-01-01 00:00:00'(epoch 0 second).


  was:
 The zero literal value for TIMESTAMP WITH LOCAL TIME ZONE type is used in `org.apache.calcite.rex.RexBuilder`
{code:java}
    case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
      return new TimestampString(0, 0, 0, 0, 0, 0);
   //TimestampString(int year, int month, int day, int h, int m, int s)
{code}
the month and day should never be zero



> Invalid zero literal value is used for TIMESTAMP WITH LOCAL TIME ZONE type in RexBuilder
> ----------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4555
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4555
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Leonard Xu
>            Priority: Major
>
>  The zero literal value for TIMESTAMP WITH LOCAL TIME ZONE type is used in `org.apache.calcite.rex.RexBuilder`
> {code:java}
>     case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
>       return new TimestampString(0, 0, 0, 0, 0, 0);
>    //TimestampString(int year, int month, int day, int h, int m, int s)
> {code}
> the month and day should never be zero, I think the zero value should be '1970-01-01 00:00:00'(epoch 0 second).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)