jnagel12 opened a new pull request, #611: URL: https://github.com/apache/iceberg-go/pull/611
## Description This pull request fixes a bug in computing the `HighestFieldID` when a schema contains list types. The `findLastFieldID` visitor previously would only return the computed highest field of a list's element. Instead, it should return the max of the `ElementID` and the computed highest field ID of the element field. Since primitive types trivially have zero-valued field IDs, this would always return zero for those types. Even if the type were non-primitive, it would break if IDs were not assigned using preorder traversal (though of course preorder is recommended). ## Testing Since I already added a final `MapType` field in `schema_test.go` for a [previous very similar patch](https://github.com/apache/iceberg-go/pull/494), I didn't want to add another redundant `ListType` field, nor refactor the test to move the existing `ListType` to be the last. Mainly just to avoid a bloated diff and or redundancy. I did a red-green refactor and took some screenshots, which hopefully will suffice. Please let me know if you would prefer I move the `ListType` to the top to prove this works. <img width="827" height="448" alt="Screenshot 2025-10-24 at 12 44 59 PM" src="https://github.com/user-attachments/assets/5a2f4521-ac7a-490a-8258-2ca70b438fb8" /> <img width="611" height="206" alt="Screenshot 2025-10-24 at 12 45 30 PM" src="https://github.com/user-attachments/assets/824d046b-5ce4-4768-b54b-83703987ff4a" /> <img width="665" height="139" alt="Screenshot 2025-10-24 at 12 45 36 PM" src="https://github.com/user-attachments/assets/d5fdc41d-4f6c-45f9-bac6-cb295336987d" /> -- 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]
