huaxingao commented on code in PR #11419:
URL: https://github.com/apache/iceberg/pull/11419#discussion_r1836006381


##########
core/src/main/java/org/apache/iceberg/schema/UnionByNameVisitor.java:
##########
@@ -163,8 +164,7 @@ private void updateColumn(Types.NestedField field, 
Types.NestedField existingFie
     String fullName = partnerSchema.findColumnName(existingField.fieldId());
 
     boolean needsOptionalUpdate = field.isOptional() && 
existingField.isRequired();
-    boolean needsTypeUpdate =
-        field.type().isPrimitiveType() && 
!field.type().equals(existingField.type());
+    boolean needsTypeUpdate = !compatibleType(field.type(), 
existingField.type());

Review Comment:
   Do we also need the `field.type().isPrimitiveType()` here?
   ```
   boolean needsTypeUpdate = field.type().isPrimitiveType() && 
!compatibleType(field.type(), existingField.type());
   ```



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to