You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/08/09 05:39:45 UTC
[GitHub] [arrow-rs] HaoYang670 opened a new issue, #2384: Rewrite Decimal Array using `const_generic`
HaoYang670 opened a new issue, #2384:
URL: https://github.com/apache/arrow-rs/issues/2384
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
Why I prefer using `const_generic` on Decimal?
- Decimal128 and Decimal256 are different datatype. However all of their fields have same data type except the length of the value buffer `[u8; 16] or [u8; 32]`. This is the situation which `const_generic` is very suitable.
- In the Rust standard library, there is a similar type using `const_generic`: the Array type: https://doc.rust-lang.org/std/primitive.array.html
- Remove some repeated code.
- More constant evaluation
- Easy to extend: We might add more Decimal type in the future. For example in arrow2, there is a PR to add Decimal 32 and 64: https://github.com/jorgecarleitao/arrow2/pull/896
Will the rewriting leads to many API changes?
Yes, But for users, the answer is no. Because this is just an internal refactor.
**Describe alternatives you've considered**
We could not do this.
**Additional context**
Related to #2362 and #2274.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] liukun4515 commented on issue #2384: Rewrite Decimal Array using `const_generic`
Posted by GitBox <gi...@apache.org>.
liukun4515 commented on issue #2384:
URL: https://github.com/apache/arrow-rs/issues/2384#issuecomment-1208959215
@HaoYang670
The refactor is reasonable for me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] liukun4515 commented on issue #2384: Rewrite Decimal Array using `const_generic`
Posted by GitBox <gi...@apache.org>.
liukun4515 commented on issue #2384:
URL: https://github.com/apache/arrow-rs/issues/2384#issuecomment-1208960273
Do you want to do all the checklist in the one pull request?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] HaoYang670 closed issue #2384: Rewrite Decimal Array using `const_generic`
Posted by GitBox <gi...@apache.org>.
HaoYang670 closed issue #2384: Rewrite Decimal Array using `const_generic`
URL: https://github.com/apache/arrow-rs/issues/2384
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] HaoYang670 commented on issue #2384: Rewrite Decimal Array using `const_generic`
Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on issue #2384:
URL: https://github.com/apache/arrow-rs/issues/2384#issuecomment-1208962694
> Do you want to do all the checklist in the one pull request?
No.
In the first PR, I will update `BasicDecimal` and `BasicDecimalArray`. I tried to make change step by step, but I have to update these 2 in one PR 😅.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org