Skip to content

Conversation

@zeroshade
Copy link
Member

Rationale for this change

An issue was found in apache/iceberg-go when attempting to retrieve data from a table containing a List Column that had a struct as the element. It was failing to propagate the element-id for the fields when fetching. I tracked it down to the schema handling here.

What changes are included in this PR?

Changes the getNestedFactory method in pqarrow/schema.go to use ListOfField instead of ListOf so that it preserves the metadata, i.e. the field id.

Are these changes tested?

Yes, a test has been added to cover this scenario.

Are there any user-facing changes?

Previously this situation would result in a field-id of -1, now users will see the field-id get propagated correctly.

@zeroshade zeroshade requested review from kou and lidavidm June 5, 2025 20:27
Copy link
Member Author

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @shubham-tomar this fixes the issue you brought up to me on the iceberg-go slack. After this is merged, I'll update the dependency in iceberg-go.

@zeroshade zeroshade merged commit 14eb8f3 into apache:main Jun 6, 2025
23 checks passed
@zeroshade zeroshade deleted the fix-propagate-pqarrow-field-ids branch June 6, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants