n0r0shi opened a new pull request, #12192:
URL: https://github.com/apache/gluten/pull/12192

   ## Summary
   
   Routes decimal `Add` and `Subtract` to Velox's `checked_add` and 
`checked_subtract` functions for both ANSI and TRY eval modes:
   
   - **ANSI mode** (`nullOnOverflow=false`): `checked_add`/`checked_subtract` 
throw on overflow, matching Spark's ANSI behavior.
   - **TRY mode**: `try(checked_add/checked_subtract)` returns null on 
overflow, using the same `try(checked_*)` pattern as integer arithmetic.
   
   Previously, TRY mode for decimal arithmetic relied on a `tryCast` in 
`CheckOverflowTransformer` to detect overflow. This change uses the consistent 
`try(checked_*)` pattern instead.
   
   ## Dependencies
   
   - facebookincubator/velox#16302 — `checked_add` / `checked_subtract` for 
decimal types (**merged**)
   
   ## Context
   
   This supersedes #11705 (stale-closed draft). Rebased on current main; 
force-push of the same branch broke the reopen path, so opening as a new PR.
   
   ## How was this patch tested?
   
   Adds `ArithmeticAnsiValidateSuite` (new) with ANSI + TRY mode coverage for 
decimal Add/Subtract.


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

Reply via email to