[
https://issues.apache.org/jira/browse/HIVE-24814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17294878#comment-17294878
]
David Mollitor commented on HIVE-24814:
---------------------------------------
Not sure if I'll fix this in this ticket or a separate one, but I just found
another fun fact:
{code:java|title=GenericUDFCurrentTimestamp.java}
if (currentTimestamp == null) {
SessionState ss = SessionState.get();
ZonedDateTime dateTime = ss.getQueryCurrentTimestamp().atZone(
ss.getConf().getLocalTimeZone());
currentTimestamp = new TimestampWritableV2(
Timestamp.valueOf(dateTime.toLocalDateTime().toString()));
}
{code}
In particular, it is calling {{toString()}} on a {{ZonedDateTime}} and then
parsing the string. Ugh. Also, {{ZonedDateTime}} uses ISO time ('T') and
therefore the internal Hive Timestamp (which is a different format), is able to
accept it here. It shouldn't need to generate and parse strings here anyway to
do the transformation.
> Harmonize Hive Date-Time Formats
> --------------------------------
>
> Key: HIVE-24814
> URL: https://issues.apache.org/jira/browse/HIVE-24814
> Project: Hive
> Issue Type: Improvement
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Harmonize Hive on JDK date-time formats courtesy of {{DateTimeFormatter}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)