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


##########
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:
   > so timestamp micros to timestamp millis can happen which leads to 
precision loss, and such schema evolution should not be allowed
   
   This may be right, but at least type promotion like ts(3) to ts(6) should be 
always allowed? Did't really get the flag `skipLogicalTimestampEvolution` or in 
which case we can skip the evolution.



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