jonvex commented on code in PR #14120:
URL: https://github.com/apache/hudi/pull/14120#discussion_r2446159527


##########
hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java:
##########
@@ -1208,7 +1226,9 @@ public static Object rewritePrimaryType(Object oldValue, 
Schema oldSchema, Schem
           return oldValue;
         case LONG:
           if (oldSchema.getLogicalType() != newSchema.getLogicalType()) {
-            if (oldSchema.getLogicalType() instanceof 
LogicalTypes.TimestampMillis) {
+            if (skipLogicalTimestampEvolution || oldSchema.getLogicalType() == 
null || newSchema.getLogicalType() == null) {

Review Comment:
   Yes, this is true, but there is actually also another case where we do need 
to support micros -> millis:
   If the user has a transformer but are using avro writer, which is still 
standard, then when we are in spark, we will always be in micros, so when we 
convert the spark back to avro, it will be in micros. But then if the target 
schema specifies millis, we need to convert micros to millis.



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