This repository was archived by the owner on Feb 18, 2024. It is now read-only.
[Requires Arrow spec] Added support for decimal 32 and 64#896
Draft
jorgecarleitao wants to merge 1 commit intomainfrom
Draft
[Requires Arrow spec] Added support for decimal 32 and 64#896jorgecarleitao wants to merge 1 commit intomainfrom
jorgecarleitao wants to merge 1 commit intomainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #896 +/- ##
===========================================
- Coverage 83.67% 70.24% -13.44%
===========================================
Files 365 347 -18
Lines 35865 18925 -16940
===========================================
- Hits 30009 13293 -16716
+ Misses 5856 5632 -224
Continue to review full report at Codecov.
|
9518c6c to
cfb7ff5
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is being worked over the arrow mailing list and apache/arrow#8578 . It is marked as draft until it is officially supported / abandoned if abandoned by the official implementation.
Note that this PR is backward incompatible:
DataType::Decimal(usize,usize)needs a new argument to differentiate between different physical types backing the (logical) decimal type.Before:
After:
where
DecimalTypeis an enum with 3 different variants (Int32,Int64,Int128).Because the other variants have an existing physical representation (
i32andi64respectively), most of this crate works out of the box (growable,filter,take,comparison(includingsimd), etc.). There is still some work for the aggregations (decimal is not yet supported),cast, and arithmetics (arithmetics for decimals work a bit different due to the precision/scale constraints).We also need to think about how to support reading from and writing to parquet (i.e. we may be able to read a parquet decimal i32 to a decimal i32 instead of i128 as we do it now).