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

Revise FromIterator for Decimal128Array to use Into instead of Borrow #2441

Closed
viirya opened this issue Aug 14, 2022 · 0 comments · Fixed by #2442
Closed

Revise FromIterator for Decimal128Array to use Into instead of Borrow #2441

viirya opened this issue Aug 14, 2022 · 0 comments · Fixed by #2442
Labels
enhancement Any new improvement worthy of a entry in the changelog parquet Changes to the parquet crate

Comments

@viirya
Copy link
Member

viirya commented Aug 14, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

Currently the element type of FromIterator for Decimal128Array is Borrow<Option<i128>. But Borrow<Option<i128> is hard to extend to other types e.g. Decimal128. Because the rust compiler doesn't allow us to implement Borrow<Option<i128> for Option<Decimal128> as Option is not defined in this crate.

Using Into trait seems more suitable and extensible.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

@viirya viirya added the enhancement Any new improvement worthy of a entry in the changelog label Aug 14, 2022
@tustvold tustvold changed the title Revise FromIterator for Decimal128Array Revise FromIterator for Decimal128Array to use Into instead of Borrow Aug 18, 2022
@alamb alamb added the parquet Changes to the parquet crate label Aug 18, 2022
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 parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants