You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/11/10 09:23:13 UTC

[GitHub] [iceberg] lcspinter commented on a change in pull request #1740: Fix casting issues when joining two Iceberg tables together on Tez

lcspinter commented on a change in pull request #1740:
URL: https://github.com/apache/iceberg/pull/1740#discussion_r520409425



##########
File path: hive3/src/main/java/org/apache/iceberg/mr/hive/serde/objectinspector/IcebergDateObjectInspectorHive3.java
##########
@@ -56,7 +56,15 @@ public DateWritableV2 getPrimitiveWritableObject(Object o) {
 
   @Override
   public Object copyObject(Object o) {
-    return o == null ? null : new Date((Date) o);
+    if (o == null) {
+      return null;
+    }
+
+    if (o instanceof Date) {
+      return new Date((Date) o);
+    } else {
+      return o;
+    }

Review comment:
       On Tez, this is called with LocalDate. On MR we get Date, which is just a wrapper around LocalDate. 




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org