marton-bod commented on a change in pull request #1455:
URL: https://github.com/apache/iceberg/pull/1455#discussion_r490998106



##########
File path: 
mr/src/main/java/org/apache/iceberg/mr/hive/serde/objectinspector/IcebergDateObjectInspector.java
##########
@@ -42,17 +42,17 @@ private IcebergDateObjectInspector() {
 
   @Override
   public Date getPrimitiveJavaObject(Object o) {
-    return o == null ? null : Date.valueOf((LocalDate) o);
+    return o == null ? null : Date.valueOf(o.toString());
   }
 
   @Override
-  public DateWritable getPrimitiveWritableObject(Object o) {
-    return o == null ? null : new 
DateWritable(DateTimeUtil.daysFromDate((LocalDate) o));
+  public DateWritableV2 getPrimitiveWritableObject(Object o) {
+    return o == null ? null : new 
DateWritableV2(DateTimeUtil.daysFromDate((LocalDate) o));

Review comment:
       Unfortunately there was a breaking change in the DateObjectInspector and 
TimestampObjectInspector interfaces in Hive3. Since we are implementing these 
interfaces, there has to a be a separate Hive2- and Hive3-compatible version of 
these implementations. I will open a new PR where the Hive2 and Hive3-specific 
parts of MR are separated into distinct modules.

##########
File path: 
mr/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergFilterFactory.java
##########
@@ -127,7 +127,7 @@ private static Object leafToLiteral(PredicateLeaf leaf) {
       case FLOAT:
         return leaf.getLiteral();
       case DATE:
-        return daysFromTimestamp((Timestamp) leaf.getLiteral());
+        return daysFromDate((Date) leaf.getLiteral());

Review comment:
       Good point, I'll make that change.

##########
File path: build.gradle
##########
@@ -603,8 +684,8 @@ if (jdkVersion == '8') {
       compile project(':iceberg-orc')
       compile project(':iceberg-parquet')
       compile project(':iceberg-arrow')
-      compile project(':iceberg-hive-metastore')
-      compile project(':iceberg-spark')
+      compile project(':iceberg-hive2-metastore')
+      compile project(":iceberg-spark")

Review comment:
       Yes, it was unintentional. Thanks for the catch




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to