viirya opened a new issue, #5674:
URL: https://github.com/apache/arrow-datafusion/issues/5674

   **Describe the bug**
   <!--
   A clear and concise description of what the bug is.
   -->
   
   Currently decimal multiply kernel (`multiply_dyn_decimal`) sets original 
scale by a divide operation. It tries to restore the scale assuming lhs and rhs 
have the same scale. For example, multiply two decimals (-491, -591) with 
precision/scale (5, 2), it will divide 290181 by 2 to get the result 29.01 with 
same precision/scale (5, 2). But by doing this, it loses decimal precision. For 
example, in Spark, the answer is 29.0181 with precision/scale (11, 4).
   
   **To Reproduce**
   <!--
   Steps to reproduce the behavior:
   -->
   
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   
   I'd expect that it behaves like Spark as mentioned above.
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->
   


-- 
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: github-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to