imtzer commented on code in PR #12202: URL: https://github.com/apache/iceberg/pull/12202#discussion_r1948391338
########## core/src/main/java/org/apache/iceberg/SchemaUpdate.java: ########## @@ -240,7 +240,10 @@ public UpdateSchema makeColumnOptional(String name) { } private void internalUpdateColumnRequirement(String name, boolean isOptional) { - Types.NestedField field = findField(name); + Types.NestedField field = findFieldFromUpdate(name); + if (field == null) { Review Comment: Thanks for code review! I hope `findFieldFromUpdate` will find field from updates only, but add a new method do `findFieldFromUpdate` first and then `findField` if `findFieldFromUpdate` return null will be better, because there are duplicated codes, is that means? -- 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