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

   ## Summary
     - Routes decimal `Add` and `Subtract` to Velox's `checked_add` and 
`checked_subtract` when ANSI mode is enabled (`nullOnOverflow = false` in 
`CheckOverflow`), so overflow throws instead of returning null.
     - Adds TRY mode support for decimal `Add`/`Subtract` using the 
`try(checked_add/checked_subtract)` pattern, consistent with how integer TRY 
arithmetic is already handled.
     - 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
     - Depends on facebookincubator/velox#16302 (merged to upstream), which 
adds `checked_add` and `checked_subtract` support for decimal types.
     - The commit is on IBM/velox `oss-main` but not yet on the `dft-` branch 
Gluten pins to. The ANSI overflow tests will pass after the next Velox version 
bump in `get-velox.sh`.
   
     ## Test plan
     - [x] Normal decimal add/subtract succeeds and matches Spark results
     - [x] Overflow on decimal add/subtract throws in ANSI mode
     - [x] `try_add`/`try_subtract` with decimals returns null on overflow
     - [ ] Full validation after Velox version bump picks up 
facebookincubator/velox#16302
   


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