yihua commented on code in PR #17581:
URL: https://github.com/apache/hudi/pull/17581#discussion_r2641829024


##########
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/utils/HiveTypeUtils.java:
##########
@@ -181,13 +182,13 @@ public static TypeInfo generateTypeInfo(Schema schema,
       return TypeInfoFactory.getVarcharTypeInfo(maxLength);
     }
 
-    if (type == INT
-        && 
AvroSerDe.DATE_TYPE_NAME.equals(schema.getProp(AvroSerDe.AVRO_PROP_LOGICAL_TYPE)))
 {
+    if (type == DATE
+        && AvroSerDe.DATE_TYPE_NAME.equals((String) 
schema.getProp(AvroSerDe.AVRO_PROP_LOGICAL_TYPE))) {
       return TypeInfoFactory.dateTypeInfo;
     }
 
     if (type == LONG
-        && 
AvroSerDe.TIMESTAMP_TYPE_NAME.equals(schema.getProp(AvroSerDe.AVRO_PROP_LOGICAL_TYPE)))
 {

Review Comment:
   @voonhous let's also add a test case on this.



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