zeroshade commented on code in PR #43957:
URL: https://github.com/apache/arrow/pull/43957#discussion_r1767191246
##########
cpp/src/arrow/util/decimal_internal.h:
##########
@@ -442,8 +516,9 @@ struct RealTraits<float> {
static constexpr float two_to_192(float x) { return x == 0 ? 0 : kFloatInf; }
static constexpr int kMantissaBits = 24;
- // ceil(log10(2 ^ kMantissaBits))
- static constexpr int kMantissaDigits = 8;
+ // log10(2 ^ kMantissaBits) ~= 7.2, let's be conservative to ensure more
accuracy
+ // with our conversions for Decimal values
Review Comment:
I've switched this back to 8 and just unconditionally send Decimal32 to the
approx algorithm. Let me know if this is sufficient or if I should put it back.
--
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]