[ https://issues.apache.org/jira/browse/HIVE-14412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15968447#comment-15968447 ]
Ashutosh Chauhan commented on HIVE-14412: ----------------------------------------- One concern I have is storing TZ in storage doesn't seem useful. Its adding implementation complexity (and wasting disk space) without any benefit. Normalizing timestamps into UTC and then storing number of millis (alongwith fractional part) will retain full fidelity. We can display that either in original TZ (or in user's session timezone). w.r.t semantics my understanding is Timestamp with Timezone should behave as [ZonedTimeZone | https://docs.oracle.com/javase/8/docs/api/java/time/ZonedDateTime.html] and Timestamp should behave as [LocalDateTime | https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html] and for this reason instead of using java.sql.Timestamp we should use java.time.ZonedTimeZone and java.time.LocalDateTime as in memory representations for TS w TZ and TS w/o TZ types. > 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.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 > > > 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)