You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Sankar Hariappan (Jira)" <ji...@apache.org> on 2021/08/21 15:14:00 UTC
[jira] [Resolved] (HIVE-25458) unix_timestamp() with string input
give wrong result
[ https://issues.apache.org/jira/browse/HIVE-25458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sankar Hariappan resolved HIVE-25458.
-------------------------------------
Fix Version/s: 4.0.0
Target Version/s: 4.0.0
Resolution: Fixed
> unix_timestamp() with string input give wrong result
> ----------------------------------------------------
>
> Key: HIVE-25458
> URL: https://issues.apache.org/jira/browse/HIVE-25458
> Project: Hive
> Issue Type: Bug
> Reporter: Ashish Sharma
> Assignee: Ashish Sharma
> Priority: Minor
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> Description -
> unix_timestamp() accept 4 value string/date/timestamp/timestamptz. Out of which date/timestamp/timestamptz use DateTimeFormatter.class where as string type use SimpleDateTimeformatter.class which cause difference is value.
> Example -
> select from_unixtime(unix_timestamp('1800-11-08 01:53:11'));
> 1800-11-08 01:35:15
> select from_unixtime(unix_timestamp(cast('1800-11-08 01:53:11' as timestamp)));
> 1800-11-08 01:53:11
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)