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

   ### Is your feature request related to a problem or challenge?
   
   Part of #11421.
   
   
[`cast_decimal_to_integer`](https://github.com/apache/arrow-rs/blob/6b34163d51aa59f7cac2edcb74e8bd1ddc6b9120/arrow-cast/src/cast/decimal.rs#L786-L801)
 divides every value by 10^scale, which is known once per cast, and truncates 
toward zero.
   
   ### Describe the solution you'd like
   
   Build a divisor from 10^scale once and divide with it for each decimal 
width. `Decimal32` and `Decimal64` can use #11467 now. `Decimal128` and 
`Decimal256` need {{01}}, with the variant chosen per batch.
   
   The `cast_decimal` benchmark covers decimal to integer casts (#11426). The 
PR reports the bot's before and after numbers and keeps the results of the 
casts with `safe: true` and `safe: false` unchanged, including values that 
overflow the target integer.
   
   ### Describe alternatives you've considered
   
   None beyond the ones in #11421.
   
   ### Additional context
   
   None.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to