-
Notifications
You must be signed in to change notification settings - Fork 916
feat: deterministic metadata encoding #7437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: deterministic metadata encoding #7437
Conversation
I currently based this off 54.3.1 but I will updated it to |
ee273f6
to
5027767
Compare
Rebased on main, ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @timsaucer -- I think this PR makes sense to me
Can you please file a ticket (it makes for better release notes / easier to understand what changed)
@alamb Thank you for the review. I have added an issue as requested, but as I am not a committer on arrow-rs I will need someone else to merge this. |
Thanks again @timsaucer and @etseidl |
Which issue does this PR close?
Rationale for this change
The ordering of metadata is not consistent since it uses a HashMap. It can be useful in unit tests to verify an output from a known hash of it's serialized values. With metadata this is not consistent.
What changes are included in this PR?
Adds ordering to the hashmap keys when encoding.
Are there any user-facing changes?
No.
Example
If you run this example multiple times, you will see the encoding changes from run to run based on the non-deterministic ordering of the hashmap iterator.