You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "wForget (via GitHub)" <gi...@apache.org> on 2025/02/28 02:59:53 UTC

[I] Overflow happened on Decimal256Array division [arrow-rs]

wForget opened a new issue, #7216:
URL: https://github.com/apache/arrow-rs/issues/7216

   **Describe the bug**
   
   Overflow happened on Decimal256Array division
   
   **To Reproduce**
   
   add test in https://github.com/apache/arrow-rs/blob/main/arrow-arith/src/numeric.rs
   
   ```
       #[test]
       fn test_decimal256_div() {
           let a = i256::from_i128(60096743305738933273387748827369321010i128);
           let b = i256::from_i128(60096763826458053191384497987259478584i128);
           let a = Decimal256Array::from_iter_values(vec![a])
               .with_precision_and_scale(38, 37)
               .unwrap();
           let b = Decimal256Array::from_iter_values(vec![b])
               .with_precision_and_scale(38, 37)
               .unwrap();
           let result = div(&a, &b).unwrap();
       }
   ```
   
   got error:
   
   ```
   called `Result::unwrap()` on an `Err` value: ArithmeticOverflow("Overflow happened on: 60096743305738933273387748827369321010 * 100000000000000000000000000000000000000000")
   thread 'numeric::tests::test_decimal256_div' panicked at arrow-arith/src/numeric.rs:1167:34:
   ```
   
   **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-unsubscribe@arrow.apache.org.apache.org

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


Re: [I] Overflow happened on Decimal256Array division [arrow-rs]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey closed issue #7216: Overflow happened on Decimal256Array division
URL: https://github.com/apache/arrow-rs/issues/7216


-- 
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-unsubscribe@arrow.apache.org

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