You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Jaume M (JIRA)" <ji...@apache.org> on 2018/10/24 23:46:00 UTC
[jira] [Commented] (HIVE-20792) Inserting timestamp with zones
truncates the data
[ https://issues.apache.org/jira/browse/HIVE-20792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16663014#comment-16663014 ]
Jaume M commented on HIVE-20792:
--------------------------------
This patch ignores timezone in the timestamp, this is the current behavior if the timestamp is specified with +1:00.
> 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
> Assignee: Jaume M
> Priority: Major
> Attachments: HIVE-20792.1.patch
>
>
> 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)