You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/03/29 08:48:26 UTC

[GitHub] [hive] marton-bod commented on a change in pull request #3147: HIVE-26077: Implement CTAS for Iceberg tables with partition spec

marton-bod commented on a change in pull request #3147:
URL: https://github.com/apache/hive/pull/3147#discussion_r837220839



##########
File path: iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/HiveIcebergTestUtils.java
##########
@@ -299,12 +300,14 @@ public static void validateDataWithSQL(TestHiveShell shell, String tableName, Li
       Assert.assertEquals(record.size(), row.length);
       for (int j = 0; j < record.size(); ++j) {
         Object field = record.get(j);
-        if (field instanceof LocalDateTime) {
+        if (field == null) {
+          Assert.assertNull(row[j]);
+        } else if (field instanceof LocalDateTime) {
           Assert.assertEquals(((LocalDateTime) field).toInstant(ZoneOffset.UTC).toEpochMilli(),
               TimestampUtils.stringToTimestamp((String) row[j]).toEpochMilli());
         } else if (field instanceof OffsetDateTime) {
           Assert.assertEquals(((OffsetDateTime) field).toInstant().toEpochMilli(),
-              TimestampTZUtil.parse((String) row[j]).toEpochMilli());
+              TimestampTZUtil.parse((String) row[j], ZoneId.systemDefault()).toEpochMilli());

Review comment:
       Did you get a failure without specifying the the zone?




-- 
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-unsubscribe@hive.apache.org

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



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