HaoYang670 commented on PR #2477:
URL: https://github.com/apache/arrow-rs/pull/2477#issuecomment-1217993143
Personally, I think what makes implementing Decimal elegantly a hard thing
is that the behavior of `Decimal` is in the middle of `trait bound` and
`generic type`:
```
Trait (Different structure, same behaviour).
/\
|
\/
Decimal128/256 (very similar structure, but not similar behaviour)
/\
|
\/
Generic Type (silmilar structure, similar behaviour)
```
So far, a consensus is that whatever the choice is, we have to implement
some part of Decimal128 and Decimal256 separately (although macro can help to
simplify this). (For example, the validation function) As currently, Decimal128
is binding to `i128` and Decimal256 is binding to `[u8; 32]` or `BigInt`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]