mbutrovich opened a new pull request, #12076:
URL: https://github.com/apache/arrow-rs/pull/12076

   # Which issue does this PR close?
   
   - Part of #11421.
   
   # Rationale for this change
   
   Integer `/` and `%` by a scalar run a hardware divide for every value. This 
is the first kernel to use the precomputed divisors from #11467.
   
   # What changes are included in this PR?
   
   - `div` and `rem` of an `Int32`, `Int64`, `UInt32` or `UInt64` array by a 
scalar build a divisor once and divide every slot with `unary`.
   - A null scalar, a divisor of 0, and a signed `/` by -1 take the existing 
kernel, so results and errors don't change.
   - Null slots of the result hold the quotient or remainder of the input's 
null slot instead of zero, as they already do for `add_wrapping`.
   - 64dc13f360 adds division by 7 to the `integer_division` benchmark, which 
reaches the divisor variants 13 and 16 don't, so the benchmark bot can compare 
against it.
   
   # Are these changes tested?
   
   `test_div_rem_by_scalar_integer` in `arrow-arith/src/numeric.rs`.
   
   <!-- TODO: bot chart -->
   
   Bot runs: Neoverse-V2 [default]() and [aligned](), Xeon 8581C [default]() 
and [aligned](), and Xeon 8581C with `-C target-cpu=x86-64-v3`, which Comet's 
x86 release builds use, [default]() and [aligned]().
   
   # Are there any significant user-facing changes?
   
   No.
   
   ## AI Disclosure
   
   I wrote this PR with help from Claude but understand and support the core 
approach, implementation, and test coverage.
   


-- 
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