goutamadwant opened a new pull request, #24156: URL: https://github.com/apache/datafusion/pull/24156
## Which issue does this PR close? - Closes #24145. ## Rationale for this change When ANSI mode is enabled, `datafusion-spark` reports type-specific DataFusion errors for integral `abs` overflow. The scalar and array paths also produce different messages. Spark 4.2 uses one canonical `ARITHMETIC_OVERFLOW` message for both paths. ## What changes are included in this PR? - Add a Spark-local checked `abs` array kernel so Spark-specific error text does not change core DataFusion behavior. - Use the Spark 4.2 `ARITHMETIC_OVERFLOW` message for scalar and array overflows. - Update the existing Spark SQL logic tests for all signed integer widths and both input shapes. ## Are these changes tested? Yes. The following checks pass: - `cargo fmt --all -- --check` - `cargo clippy -p datafusion-spark --all-targets --all-features -- -D warnings` - `cargo test -p datafusion-spark --all-features` - `cargo test --profile=ci --test sqllogictests -- spark/math/abs.slt` - `cargo test --profile=ci --test sqllogictests -- math.slt` - `RUST_BACKTRACE=1 cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-cli --workspace --lib --tests --bins --features avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption` ## Are there any user-facing changes? Yes. With `datafusion.execution.enable_ansi_mode = true`, Spark `abs` overflow errors now use Spark 4.2's canonical `ARITHMETIC_OVERFLOW` message for scalar and array inputs. There are no public API changes. -- 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]
