Dandandan opened a new pull request, #21339: URL: https://github.com/apache/datafusion/pull/21339
## Summary - When evaluating arithmetic binary expressions (`+`, `-`, `*`, `/`, `%`), reuse the left operand's buffer in-place when its `Arc` reference count is 1, avoiding a buffer allocation - Uses `PrimitiveArray::unary_mut` for array-scalar and `into_builder` for array-array cases on all integer (i8–u64) and float (f16–f64) types - Only wrapping (infallible) ops use in-place mutation; checked overflow ops and division by zero fall back to standard Arrow kernels ## Test plan - [x] All 1367 existing `datafusion-physical-expr` tests pass - [x] All 26 `datafusion-physical-expr-common` tests pass - [x] `cargo clippy` clean with `-D warnings` - [ ] Benchmark arithmetic-heavy queries (e.g. `SELECT a+b+c+d FROM t`) to measure allocation savings 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
