jackye1995 commented on a change in pull request #3323:
URL: https://github.com/apache/iceberg/pull/3323#discussion_r743390226



##########
File path: api/src/main/java/org/apache/iceberg/types/TypeUtil.java
##########
@@ -282,10 +282,10 @@ public static boolean isPromotionAllowed(Type from, 
Type.PrimitiveType to) {
 
     switch (from.typeId()) {
       case INTEGER:
-        return to == Types.LongType.get();
+        return to.equals(Types.LongType.get());

Review comment:
       I think we use `StructLikeWrapper` to compare any `StructLike` such as 
`PartitionData`, for example: 
https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/DeleteFileIndex.java#L396-L398
 




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

Reply via email to