simhadri-g commented on code in PR #5241:
URL: https://github.com/apache/hive/pull/5241#discussion_r1601448536


##########
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/timestamp/NanoTimeUtils.java:
##########
@@ -100,12 +107,14 @@ public static Timestamp getTimestamp(NanoTime nt, ZoneId 
targetZone, boolean leg
       julianDay--;
     }
 
-    JulianDate jDateTime;
-    jDateTime = JulianDate.of((double) julianDay);
+    JulianDate jDateTime = JulianDate.of((double) julianDay);
+    LocalDateTime localDateTime;
+    int leapYearDateAdjustment = legacyConversion ?  
julianLeapYearAdjustment(jDateTime) : 0;
+    localDateTime = jDateTime.add(leapYearDateAdjustment).toLocalDateTime();
     Calendar calendar = getGMTCalendar();
-    calendar.set(Calendar.YEAR, jDateTime.toLocalDateTime().getYear());

Review Comment:
   Hi @zabetak ,
   Thanks for the review. 
   
   The entire issue starts from Removal of JDateTime here in jodd v4.3 
https://github.com/oblac/jodd/commit/3d9772d8be3a974bd49eef29c26c086bbb0aad1a 
   
   In the change , they have moved from jodd.datetime.JDateTime to 
java.time.LocalDateTime and LocalDateTime doesn't support julian leap year 
dates such as 200-02-29



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to