feat: assign fresh field ids for new schema - #430
Merged
Conversation
WZhuo
force-pushed
the
id_assigner
branch
4 times, most recently
from
December 23, 2025 02:57
88f50bf to
1006ae4
Compare
wgtmac
reviewed
Dec 23, 2025
wgtmac
reviewed
Dec 23, 2025
| } | ||
|
|
||
| std::shared_ptr<StructType> AssignFreshIdVisitor::Visit(const StructType& type) const { | ||
| auto fresh_ids = type.fields() | |
Member
There was a problem hiding this comment.
FYI: there is a discussion thread for orders to generate these ids: https://lists.apache.org/thread/kwfy80s2nm6xcpohkrzznsmhqsmz32c3
Contributor
Author
There was a problem hiding this comment.
It has some misunderstandings about the id assigner. All the implementations it mentioned, including Java, Python, and Rust, are consistent. The actual implementation is: use pre-order traversal, and a field's ID is assigned when its parent node is visited. This ensures that the IDs of the first-level child nodes in a struct are consecutive.
WZhuo
force-pushed
the
id_assigner
branch
2 times, most recently
from
December 23, 2025 08:56
aeac91e to
10d688d
Compare
wgtmac
approved these changes
Dec 23, 2025
wgtmac
left a comment
Member
There was a problem hiding this comment.
Thanks for working on it! Generally LGTM. I've left some minor comments.
wgtmac
approved these changes
Dec 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR mainly includes the following changes: