You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "David Mollitor (Jira)" <ji...@apache.org> on 2021/02/05 15:52:00 UTC
[jira] [Resolved] (HIVE-24701) Remove String Manipulation from Date
Parsing TimestampTZUtil
[ https://issues.apache.org/jira/browse/HIVE-24701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Mollitor resolved HIVE-24701.
-----------------------------------
Resolution: Duplicate
Duplicates [HIVE-24693]
> Remove String Manipulation from Date Parsing TimestampTZUtil
> ------------------------------------------------------------
>
> Key: HIVE-24701
> URL: https://issues.apache.org/jira/browse/HIVE-24701
> Project: Hive
> Issue Type: Improvement
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> This operation is pretty slow:
> {code:java}
> // Converts Date to TimestampTZ.
> public static TimestampTZ convert(Date date, ZoneId defaultTimeZone) {
> return parse(date.toString(), defaultTimeZone);
> }
> {code}
> To convert from Date to TimestampTZ, it creates a string, then parses it. Should be able to just look at the epoch time and do the conversion without all the string manipulation/parsing.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)