Jaume M created HIVE-20792:
------------------------------

             Summary: Inserting timestamp with zones truncates the data
                 Key: HIVE-20792
                 URL: https://issues.apache.org/jira/browse/HIVE-20792
             Project: Hive
          Issue Type: Bug
          Components: Serializers/Deserializers
    Affects Versions: 3.1.0
            Reporter: Jaume M


For example with the table:

{code}
CREATE TABLE myTable
(
a TIMESTAMP
)
STORED AS ORC
tblproperties("transactional"="true");
{code}

The following inserts store the wrong data:
{code}
INSERT INTO myTable VALUES("2018-10-19 10:35:00 UTC"); -> 2018-10-19 00:00:00.0
INSERT INTO myTable VALUES("2018-10-19 10:35:00 ZZZ"); -> 2018-10-19 00:00:00.0
{code}

The second one should fail since ZZZ is not a time zone.
Similarly if the column is of type DATE,
{code}
INSERT INTO myTableDate VALUES("2018-10-19 AAAA"); -> 2018-10-19
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to