nastra commented on code in PR #11419:
URL: https://github.com/apache/iceberg/pull/11419#discussion_r1839893460
##########
core/src/main/java/org/apache/iceberg/schema/UnionByNameVisitor.java:
##########
@@ -180,6 +180,17 @@ private void updateColumn(Types.NestedField field,
Types.NestedField existingFie
}
}
+ private boolean compatibleType(Type newType, Type existingType) {
+ if (existingType.isPrimitiveType()) {
+ // Primitive -> Wider Primitive
+ return newType.isPrimitiveType()
+ && TypeUtil.isPromotionAllowed(newType,
existingType.asPrimitiveType());
Review Comment:
shouldn't this be `TypeUtil.isPromotionAllowed(existingType,
newType.asPrimitiveType())`? The signature of the method is `public static
boolean isPromotionAllowed(Type from, Type.PrimitiveType to)`
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]