Skip to content

Conversation

@wgtmac
Copy link
Member

@wgtmac wgtmac commented Aug 3, 2025

No description provided.

Comment on lines +42 to +47
auto group_node = internal::checked_pointer_cast<::parquet::schema::GroupNode>(node);
for (int i = 0; i < group_node->field_count(); i++) {
if (HasFieldIds(group_node->field(i))) {
return true;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

What does this means? Any leaf has field-id?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just simply check if any field (whether leaf or non-leaf) has field-id. This is in sync with the Java impl.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we cannot blindly check if all fields have ids because it is valid to have some fields that do not have ids, especially when variant type is supported.

Copy link
Member

Choose a reason for hiding this comment

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

I knew that for 3-levels complex type, fieldId might not exists, but here I don't fully understand the purpose, so any leaf has field-id means writer is field-id aware?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think Iceberg only supports three-level list encoding per the spec: https://iceberg.apache.org/spec/#parquet

Lists must use the 3-level representation.

@wgtmac
Copy link
Member Author

wgtmac commented Aug 4, 2025

@Fokko @zeroshade Could you help review this? Thanks!

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

LGTM

@Fokko Fokko merged commit 646a1b9 into apache:main Aug 4, 2025
5 checks passed
@Fokko
Copy link
Contributor

Fokko commented Aug 4, 2025

Thanks @wgtmac for adding this, and thanks @mapleFU and @lidavidm for the review 🚀

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.

4 participants