Skip to content
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

Preserve dict_id on Field during serde roundtrip #8457

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

avantgardnerio
Copy link
Contributor

@avantgardnerio avantgardnerio commented Dec 7, 2023

Which issue does this PR close?

Closes #8461.

Rationale for this change

When round-tripping a Schema in our application, we noticed the dict_id on Fields appears to "get lost", which breaks what we are working on. This PR is an attempt to prove / fix the issue.

What changes are included in this PR?

Serde the info.

Are these changes tested?

With a unit test.

Are there any user-facing changes?

Serde should work better.

@avantgardnerio avantgardnerio marked this pull request as ready for review December 7, 2023 17:01
@avantgardnerio
Copy link
Contributor Author

avantgardnerio commented Dec 7, 2023

Related to apache/arrow-rs#1206 . I think if we go that route, then we still:

  1. merge this PR so it is added to proto::Field (where it is needed)
  2. file a subsequent PR to remove it from arrow_schema::Field and assign it in the IPC writer

Copy link
Contributor

@thinkharderdev thinkharderdev left a comment

Choose a reason for hiding this comment

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

lgtm

@Dandandan
Copy link
Contributor

Thank you @avantgardnerio 🥳

@Dandandan Dandandan merged commit a8d74a7 into apache:main Dec 8, 2023
23 checks passed
@Dandandan Dandandan deleted the bg_dict_upstream branch December 8, 2023 11:10
appletreeisyellow pushed a commit to appletreeisyellow/datafusion that referenced this pull request Dec 15, 2023
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.

Field::dict_id does not round trip
3 participants