[
https://issues.apache.org/jira/browse/HIVE-14412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15430384#comment-15430384
]
Rui Li commented on HIVE-14412:
-------------------------------
I think make HiveTimestamp a subclass of Timestamp can be problematic. E.g. I'm
not sure how we should compare one type to the other. If the TZ info takes part
in comparison, Timestamp.compareTo(HiveTimestamp) and
HiveTimestamp.compareTo(Timestamp) can return different results. If exclude TZ
from comparison, then the comparison is not inline with the BinaryComparable
form (i.e. we need to store the TZ info when serialized).
So I think maybe a compound type is better than subclass. I'll try making
HiveTimestamp a wrapper of Timestamp.
> 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.1.patch, HIVE-14412.1.patch,
> HIVE-14412.1.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.4#6332)