Jinho Kim created TAJO-2128:
-------------------------------

             Summary: Add validator of Date/Time 
                 Key: TAJO-2128
                 URL: https://issues.apache.org/jira/browse/TAJO-2128
             Project: Tajo
          Issue Type: New Feature
          Components: Query Validation
    Affects Versions: 0.12.0
            Reporter: Jinho Kim


Currently, tajo are not check the syntax of datetime type.
We should add validator

* Tajo
{noformat}
default> select '00:10:10'::timestamp;
?cast
-------------------------------
0002-11-30 00:10:10 BC

default> select '00:10:10'::date;
?cast
-------------------------------
0002-11-30
(1 rows, 0.003 sec, 0 B selected)

default> select '1992-01-01'::time;
?cast
-------------------------------
1992:01:01
(1 rows, 0.003 sec, 0 B selected)
{noformat}

* Postgres
{noformat}
postgres=# select '00:10:10'::timestamp;
ERROR:  invalid input syntax for type timestamp: "00:10:10"
LINE 1: select '00:10:10'::timestamp;
               ^
postgres=# select '00:10:10'::date;
ERROR:  invalid input syntax for type date: "00:10:10"
LINE 1: select '00:10:10'::date;
               ^
postgres=# select '1992-01-01'::time;
ERROR:  invalid input syntax for type time: "1992-01-01"
LINE 1: select '1992-01-01'::time;
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to