LinSimon-901101 opened a new pull request, #6249: URL: https://github.com/apache/datafusion-comet/pull/6249
## Which issue does this PR close? Closes #6217. ## Rationale for this change Comet's ANSI integral overflow errors differ from Spark's. Byte/Short addition, subtraction, and multiplication report a generic arithmetic overflow instead of the version-specific binary overflow error. Int/Long overflow errors also omit the corresponding `try_*` suggestion. ## What changes are included in this PR? - Produce `BinaryArithmeticOverflow` for Byte/Short addition, subtraction, and multiplication, preserving the failing operands and operator. - Carry `try_add`, `try_subtract`, and `try_multiply` suggestions through the native error payload and Spark shims. - Preserve Spark-version-specific error behavior, unary operation behavior, and compatibility with payloads that omit the suggestion. - Add regression coverage for overflow boundaries, scalar/array combinations, NULLs, slices, and TRY/legacy behavior. - Remove the resolved compatibility note for #6217. Successful arithmetic continues to use the existing Arrow kernels. Recovering the failing operands requires an additional scan only after a Byte/Short overflow is detected. ## How are these changes tested? The integration tests use Parquet-backed operands to avoid constant folding, disable the codegen dispatcher, and check the Comet execution plan. They compare exception types, error classes, SQLSTATE, and complete message parameters against the corresponding Spark version. Local validation passed: - Rust arithmetic tests: 183 passed. - Rust error serialization tests: 11 passed. - Spark 4.1 regression tests: 34 passed. - Focused tests on Spark 3.4, 3.5, 4.0, and 4.2: 19 passed per profile. - Rustfmt, Clippy with warnings denied, and `git diff --check`. Fork CI passed for commit `3ae4ea519f4a2d0a23347f0c2069fc2a982767e1`: - [[Comet CI](https://github.com/LinSimon-901101/datafusion-comet/actions/runs/36257965076)](https://github.com/LinSimon-901101/datafusion-comet/actions/runs/36257965076) - [[Comet tests across Spark profiles](https://github.com/LinSimon-901101/datafusion-comet/actions/runs/36258801901)](https://github.com/LinSimon-901101/datafusion-comet/actions/runs/36258801901) - [[Spark 4.1 upstream SQL tests, including all seven Catalyst/Core/Hive test groups](https://github.com/LinSimon-901101/datafusion-comet/actions/runs/36258801932)](https://github.com/LinSimon-901101/datafusion-comet/actions/runs/36258801932) -- 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]
