KiranVelumuri commented on code in PR #5309:
URL: https://github.com/apache/hive/pull/5309#discussion_r1768762667


##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestMetaStoreUtils.java:
##########
@@ -67,9 +69,31 @@ public static Collection<Object[]> 
generateZoneTimestampPairs() {
         params.add(new Object[] { zone, datetime });
       }
     });
+    // Timestamp and Date do not have the year 0000. So, the year 0000 gets 
converted to year 0001.
+    // This is one such test case with year as 0000: 0000-01-07 22:44:36
+    params.add(new Object[] {"Asia/Kolkata", 
LocalDateTime.ofEpochSecond(-62166618924L, 0, ZoneOffset.UTC)});
+    generateDaylightSavingTimestampPairs(params);
     return params;
   }
 
+  public static void generateDaylightSavingTimestampPairs(List<Object[]> 
params) {
+    // For U.S timezones, the timestamp 2024-03-10 02:01:00 falls between the 
transition from 02:00 AM to 03:00 AM for daylight savings
+    params.add(new Object[] {"America/Anchorage", 
LocalDateTime.ofEpochSecond(1710036060L, 0, ZoneOffset.UTC)});
+    params.add(new Object[] {"America/St_Johns", 
LocalDateTime.ofEpochSecond(1710036060L, 0, ZoneOffset.UTC)});
+    params.add(new Object[] {"America/Chicago", 
LocalDateTime.ofEpochSecond(1710036060L, 0, ZoneOffset.UTC)});
+    params.add(new Object[] {"America/Indiana/Indianapolis", 
LocalDateTime.ofEpochSecond(1710036060L, 0, ZoneOffset.UTC)});
+    params.add(new Object[] {"America/Los_Angeles", 
LocalDateTime.ofEpochSecond(1710036060L, 0, ZoneOffset.UTC)});

Review Comment:
   They are in different time zones with DST, so included them



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to