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