CodingCat commented on PR #8325:
URL: https://github.com/apache/iceberg/pull/8325#issuecomment-1725935984
> @CodingCat Thanks for raising this PR, and sorry for the long wait. As you
mentioned in the PR description, this operation should be able to be done in a
single commit. I dug into it, and I was able to let the test pass (thank you
for writing those!) 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:
>
> ```java
> 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?
Hi, @Fokko thanks for the review and comments, I agree, this is a cleaner
fix, I updated the PR
--
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]