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

Implement Hash for Schema #2182

Closed
crepererum opened this issue Jul 27, 2022 · 0 comments · Fixed by #2183
Closed

Implement Hash for Schema #2182

crepererum opened this issue Jul 27, 2022 · 0 comments · Fixed by #2183
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@crepererum
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Schema currently implements Eq but not Hash. The latter would be useful for the following reasons:

  1. Sometimes it would be helpful if you could stick a Schema into a HashSet/HashMap, e.g. for interning (this is a quite costly way to intern a schema and usually you should use a cheap proxy key, but sometimes this is also the only easy way to intern a schema)
  2. Implement Hash for a struct that contains a Schema for whatever reason.

Describe the solution you'd like
Implement Hash for Schema.

Describe alternatives you've considered
Not implementing it.

Additional context

@crepererum crepererum added the enhancement Any new improvement worthy of a entry in the changelog label Jul 27, 2022
crepererum added a commit to crepererum/arrow-rs that referenced this issue Jul 27, 2022
@alamb alamb added the arrow Changes to the arrow crate label Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants