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

   **Describe the bug**
   e.g the `multiply_decimal`
   ```
   pub(crate) fn multiply_decimal(
       left: &Decimal128Array,
       right: &Decimal128Array,
   ) -> Result<Decimal128Array> {
       let divide = 10_i128.pow(left.scale() as u32);
       let array = multiply(left, right)?;
       let array = divide_scalar(&array, divide)?
           .with_precision_and_scale(left.precision(), left.scale())?;
       Ok(array)
   }
   ```
   
   Loses information, as integer division is used instead of increasing the 
precision / scale.
   The same applies for addition as well.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **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