[ 
https://issues.apache.org/jira/browse/HIVE-28337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stamatis Zampetakis resolved HIVE-28337.
----------------------------------------
    Fix Version/s: 4.1.0
       Resolution: Fixed

Fixed in 
[https://github.com/apache/hive/commit/e31811bb7c6670ab1f725adde3aa2b012ca64415]

Thanks for the PR [~kiranvelumuri] and for the review [~wechar] !

> Process timestamps at UTC timezone instead of local timezone in MetaStoreUtils
> ------------------------------------------------------------------------------
>
>                 Key: HIVE-28337
>                 URL: https://issues.apache.org/jira/browse/HIVE-28337
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Kiran Velumuri
>            Assignee: Kiran Velumuri
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.1.0
>
>         Attachments: image-2024-06-18-12-42-05-646.png, 
> image-2024-06-18-12-42-31-472.png
>
>
> Currently in MetaStoreUtils, the conversion to/from timestamp and string 
> makes use of LocalDateTime in the local time zone while processing 
> timestamps. This causes issue with representing timestamps *as mentioned 
> below*. Instead, while dealing with timestamps it is proposed to use 
> java.time.Instant to represent a point on the time-line, which would overcome 
> the issue with representing such timestamps. Accordingly the test class for 
> MetaStoreUtils (TestMetaStoreUtils) has also been modified to account for 
> these changes.
> +Failing scenario:+
> Timestamps in time-zones which observe daylight savings during which the 
> clock is set forward(typicallly 2:00 AM - 3:00 AM)
> Example: 2417-03-26T02:08:43 in Europe/Paris is invalid, and would get 
> converted to 2417-03-26T03:08:43 by Timestamp.valueOf() method, when instead 
> we want to represent the original timestamp without conversion.
> This is happening due to representing timestamp as LocalDateTime in 
> TestMetaStoreUtils, which is independent of the time-zone of the timestamp. 
> This LocalDateTime timestamp when combined with time-zone is leading to 
> invalid timestamp.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to