[ 
https://issues.apache.org/jira/browse/HIVE-25403?focusedWorklogId=631462&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-631462
 ]

ASF GitHub Bot logged work on HIVE-25403:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Jul/21 05:26
            Start Date: 30/Jul/21 05:26
    Worklog Time Spent: 10m 
      Work Description: warriersruthi opened a new pull request #2550:
URL: https://github.com/apache/hive/pull/2550


   The query 
   SELECT from_unixtime(unix_timestamp(cast('1400-01-01' as date)));
   was giving wrong results, because the from_unixtime() function was not 
considering leap seconds while representing Timestamp (it was using 
java.utils.Date). 
   The Unix_timestamp() already considered this, so in order to get the correct 
results for the above query, it was required to change the epoch time in the 
from_unixtime() to ZonedDateTime. The required conversion was done with the 
help of the Instant class, which represents a moment given the epoch time. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 631462)
    Remaining Estimate: 0h
            Time Spent: 10m

>  from_unixtime() does not consider leap seconds
> -----------------------------------------------
>
>                 Key: HIVE-25403
>                 URL: https://issues.apache.org/jira/browse/HIVE-25403
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>            Reporter: Sruthi Mooriyathvariam
>            Assignee: Sruthi Mooriyathvariam
>            Priority: Major
>             Fix For: 3.1.2
>
>         Attachments: image-2021-07-29-14-42-49-806.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The Unix_timestamp() considers "leap second" while the from_unixtime is not; 
> which results in to wrong result as below:
> !image-2021-07-29-14-42-49-806.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to