RussellSpitzer commented on PR #11419: URL: https://github.com/apache/iceberg/pull/11419#issuecomment-2468649457
I think we may need to change the name from compatibleType ... I think the check here is more like "ignoreTypeChange" since we basically let invalid type changes go through to fail in other parts of the code :shrug: On Mon, Nov 11, 2024 at 12:12 AM Huaxin Gao ***@***.***> wrote: > ***@***.**** commented on this pull request. > ------------------------------ > > In core/src/main/java/org/apache/iceberg/schema/UnionByNameVisitor.java > <https://github.com/apache/iceberg/pull/11419#discussion_r1836006381>: > > > @@ -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()); > > Do we also need the field.type().isPrimitiveType() here? > > boolean needsTypeUpdate = field.type().isPrimitiveType() && !compatibleType(field.type(), existingField.type()); > > — > Reply to this email directly, view it on GitHub > <https://github.com/apache/iceberg/pull/11419#pullrequestreview-2426195003>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AADE2YOSLV5WRENR2EZVP6T2ABDDBAVCNFSM6AAAAABQZCVRCOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMRWGE4TKMBQGM> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> > -- 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