Fokko commented on PR #8325:
URL: https://github.com/apache/iceberg/pull/8325#issuecomment-1724984635
@CodingCat Thanks for raising this PR, and sorry for the long wait. I dug
into it, and I was able to let the test pass with the following change:
```java
private Integer findForMove(String name) {
Types.NestedField field = findField(name);
if (field != null) {
return field.fieldId();
}
return addedNameToId.get(name);
}
```
To:
```
private Integer findForMove(String name) {
Integer addedId = addedNameToId.get(name);
if (addedId != null) {
return addedId;
}
Types.NestedField field = findField(name);
if (field != null) {
return field.fieldId();
}
return null;
}
```
This way we keep all the logic of moving fields in the same place. WDYT?
--
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]