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

Encode Field and Schema metadata using the same type #2262

Closed
alamb opened this issue Aug 1, 2022 · 0 comments · Fixed by #3148
Closed

Encode Field and Schema metadata using the same type #2262

alamb opened this issue Aug 1, 2022 · 0 comments · Fixed by #3148
Labels
enhancement Any new improvement worthy of a entry in the changelog

Comments

@alamb
Copy link
Contributor

alamb commented Aug 1, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Right now, Schema metadata is encoded using HashMap and Field metadata is encoded using BTreeMap:

This is confusing and makes for awkward code.

Describe the solution you'd like
A single unified metadata type for both Schema and Field

Describe alternatives you've considered

  1. Standardize on either HashMap or BTreeMap
  2. Standardize on either Option<HashMap> or Option<BTreeMap>
  3. Make an arrow specific Metadata type that wraps HashMap / BTreeMap and implements whatever extra behavior might be needed

Additional context
There is quite a bit of discussion on #2261

@alamb alamb added the enhancement Any new improvement worthy of a entry in the changelog label Aug 1, 2022
crepererum added a commit to crepererum/arrow-rs that referenced this issue Nov 21, 2022
crepererum added a commit to crepererum/arrow-rs that referenced this issue Nov 21, 2022
crepererum added a commit to crepererum/arrow-rs that referenced this issue Nov 21, 2022
crepererum added a commit to crepererum/arrow-rs that referenced this issue Nov 21, 2022
crepererum added a commit to crepererum/arrow-rs that referenced this issue Nov 21, 2022
tustvold added a commit that referenced this issue Nov 21, 2022
* refactor: convert `Field::metadata` to `HashMap`

Closes #2262.

* refactor: code formatting

Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com>

Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant