You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now Decimal128 is represented as two 64-bit integers (in native endian order) and Decimal256 is represented as a std::array (in native endian order). We could make these consistent (presumably there should be no performance impact). It may also make it easier to extract a common base class or other niceties.
Yibo Cai / @cyb70289:
Just FYI. I did a superficial investigation of unifying decimal128/256 (ARROW-13439). I abandoned the task as my approach is not very satisfying.
But I do think it's beneficial to combined decimal128/256.
David Li / @lidavidm:
Another reason why this would be good: nominally Decimal is the same as FixedSizeBinary, however, in compute kernels, currently they need separate handling because their scalar representations are different (Decimal vs Buffer). You could imagine trying to work with all these types via util::string_view or const uint8_t*, however, the representation for BasicDecimal128 makes this hard; there is no native-endian representation that we can just create a pointer to. (Well, the fields in BasicDecimal128 are in native-endian order so you can reinterpret_cast a pointer to the right field, but it would be a little cleaner to have both implementations of native_endian_array() return a std::array& instead of a std::array).
Right now Decimal128 is represented as two 64-bit integers (in native endian order) and Decimal256 is represented as a std::array (in native endian order). We could make these consistent (presumably there should be no performance impact). It may also make it easier to extract a common base class or other niceties.
Reporter: David Li / @lidavidm
Assignee: Antoine Pitrou / @pitrou
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-13617. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: