Describe the bug, including details regarding any error messages, version, and platform.
Below codes calculate the decimal type's precision and scale.
|
result_scale = std::max(kMinAdjustedScale, s1 + p2 + 1); |
It seems different from our Redshift’s decimal promotion rules, is there any relevant background here?
scale = max(4, s1 + p2 - s2 + 1)
precision = p1 - s1 + s2 + scale
It may cause the decimal divide results different from normal expression calculate.
Component(s)
C++ - Gandiva
Describe the bug, including details regarding any error messages, version, and platform.
Below codes calculate the decimal type's precision and scale.
arrow/cpp/src/gandiva/decimal_type_util.cc
Line 62 in 30e6d72
It seems different from our Redshift’s decimal promotion rules, is there any relevant background here?
It may cause the decimal divide results different from normal expression calculate.
Component(s)
C++ - Gandiva