[ 
https://issues.apache.org/jira/browse/CALCITE-5678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17718802#comment-17718802
 ] 

Evgeny Stanilovsky commented on CALCITE-5678:
---------------------------------------------

In such a case this validation approach looks little bit unfinished, cause i 
use LocalDate[Time] only for validation and not use output at all, it will 
bring some performance drop. Thus i suggest to split such activity into two 
different issues. However current PR pass all existing and additional tests, 
probably it can be included ? 

> Calcite should reject date literals not satisfying Gregorian calendar, per 
> SQL standard
> ---------------------------------------------------------------------------------------
>
>                 Key: CALCITE-5678
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5678
>             Project: Calcite
>          Issue Type: Improvement
>          Components: avatica
>    Affects Versions: 1.34.0
>            Reporter: Evgeny Stanilovsky
>            Assignee: Evgeny Stanilovsky
>            Priority: Major
>              Labels: patch-available
>
> 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
> {noformat}
> 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 |
> > +---+---------------------+{noformat}



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

Reply via email to