[
https://issues.apache.org/jira/browse/HIVE-14412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15985892#comment-15985892
]
Rui Li commented on HIVE-14412:
-------------------------------
As discussed in HIVE-16418, we won't store the TZ part and all TimestampTZ
will display using UTC. Besides, we'll use ZonedDateTime for TimestampTZ.
ZonedDateTime is a composition of Instant and TZ. Only the instant will be
stored and used for all the computations e.g. compare, hashCode. Therefore we
can handle TimestampTZ similarly as we currently handle Timestamp. I copied
most of the code instead of reusing it. Because in the long run we'll replace
java.sql.Timestamp with LocalDateTime for Timestamp, which is a description of
date/time and doesn't represent an instant.
[~ashutoshc], [~xuefuz], [~jdere] could you take a look? I've put v10 patch to
RB.
> Add a timezone-aware timestamp
> ------------------------------
>
> Key: HIVE-14412
> URL: https://issues.apache.org/jira/browse/HIVE-14412
> Project: Hive
> Issue Type: Sub-task
> Components: Hive
> Reporter: Rui Li
> Assignee: Rui Li
> Attachments: HIVE-14412.10.patch, HIVE-14412.1.patch,
> HIVE-14412.2.patch, HIVE-14412.3.patch, HIVE-14412.4.patch,
> HIVE-14412.5.patch, HIVE-14412.6.patch, HIVE-14412.7.patch,
> HIVE-14412.8.patch, HIVE-14412.9.patch
>
>
> Java's Timestamp stores the time elapsed since the epoch. While it's by
> itself unambiguous, ambiguity comes when we parse a string into timestamp, or
> convert a timestamp to string, causing problems like HIVE-14305.
> To solve the issue, I think we should make timestamp aware of timezone.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)