xicm commented on code in PR #7173:
URL: https://github.com/apache/hudi/pull/7173#discussion_r1020065614


##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/utils/HiveAvroSerializer.java:
##########
@@ -298,14 +297,12 @@ private Object 
serializePrimitive(PrimitiveObjectInspector fieldOI, Object struc
         String string = 
(String)fieldOI.getPrimitiveJavaObject(structFieldData);
         return new Utf8(string);
       case DATE:
-        return 
DateWritable.dateToDays(((DateObjectInspector)fieldOI).getPrimitiveJavaObject(structFieldData));
+        return new DateWritable((DateWritable)structFieldData).getDays();

Review Comment:
   ohh, I compile with hive 3.1.2 and TestHiveAvroSerializer, the test is 
successful. Let me do more tests.



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

Reply via email to