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

Simhadri Govindappa updated HIVE-28249:
---------------------------------------
    Description: 
When handling legacy timezone conversions in parquet,  'February 29' year '200' 
is an edge case. 

This is because, according to this: [https://www.lanl.gov/Caesar/node202.html]

The Julian day for 200 CE/02/29 in the Julian calendar is different from the 
Julian day in Gregorian Calendar .
|Date (BC/AD)|Date (CE)|Julian Day|Julian Day|
| | |(Julian Calendar)|(Gregorian Calendar)|
|200 AD/02/28|200 CE/02/28|1794166|1794167|
|200 AD/02/29|200 CE/02/29|1794167|1794168|
|200 AD/03/01|200 CE/03/01|1794168|1794168|

As a result since hive stores timestamp in UTC, when converting 200 CE/03/01 
between timezones, hive runs into an exception and fails with "not a leap year 
exception" for 29th Feb 200 even if the actual record inserted was 200 CE/03/01 
in Asia/Singapore timezone.

> Parquet legacy timezone conversion converts march 1st to 29th feb and fails 
> with not a leap year exception
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-28249
>                 URL: https://issues.apache.org/jira/browse/HIVE-28249
>             Project: Hive
>          Issue Type: Task
>            Reporter: Simhadri Govindappa
>            Assignee: Simhadri Govindappa
>            Priority: Major
>
> When handling legacy timezone conversions in parquet,  'February 29' year 
> '200' is an edge case. 
> This is because, according to this: [https://www.lanl.gov/Caesar/node202.html]
> The Julian day for 200 CE/02/29 in the Julian calendar is different from the 
> Julian day in Gregorian Calendar .
> |Date (BC/AD)|Date (CE)|Julian Day|Julian Day|
> | | |(Julian Calendar)|(Gregorian Calendar)|
> |200 AD/02/28|200 CE/02/28|1794166|1794167|
> |200 AD/02/29|200 CE/02/29|1794167|1794168|
> |200 AD/03/01|200 CE/03/01|1794168|1794168|
> As a result since hive stores timestamp in UTC, when converting 200 CE/03/01 
> between timezones, hive runs into an exception and fails with "not a leap 
> year exception" for 29th Feb 200 even if the actual record inserted was 200 
> CE/03/01 in Asia/Singapore timezone.



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

Reply via email to