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

   ## What changes are proposed in this pull request?
   
   Add Velox-backend integration for Spark SQL `BROUND`:
   
   - Route decimal inputs to the Velox `decimal_bround` special form while 
primitive inputs use `bround`.
   - Validate that the required primitive function or decimal special form is 
registered before native offload.
   - Reuse decimal-round result-type derivation for `BROUND`, including null 
and extreme constant scales.
   - Add focused parser, native function, transformer, and Spark 4.1 execution 
coverage.
   - Mark `bround` as partially supported in the Velox scalar-function 
documentation.
   
   FLOAT and DOUBLE inputs intentionally round the native binary value 
directly. This can differ from Spark's decimal-string conversion; for example, 
`bround(cast(0.575 as DOUBLE), 2)` returns `0.57` natively instead of Spark's 
`0.58`.
   
   This change depends on the companion Velox implementation in 
facebookincubator/velox#19276 being included in Gluten's pinned Velox 
dependency before merge.
   
   apache/gluten#13047 is an existing draft for the alternative 
facebookincubator/velox#19072 implementation. That draft carries a different 
captured-ANSI and JVM-compatibility contract; this change instead follows the 
contract selected in facebookincubator/velox#19276.
   
   ## How was this patch tested?
   
   - Added C++ parser mapping tests for primitive and decimal `bround`.
   - Added native function tests for binary floating-point rounding and 
integral ANSI overflow behavior.
   - Added Scala tests for decimal transformation, null scales, and extreme 
scales.
   - Added a Spark 4.1 Velox execution suite covering integral, decimal, 
floating-point, ANSI overflow, null scales, and extreme constant scales.
   - `./dev/format-scala-code.sh check`
   - License-header validation for all changed files.
   - `git diff --check`
   
   Native builds and test binaries were not run locally because the currently 
pinned Velox dependency does not yet contain the companion implementation. The 
draft PR is intended to use CI after the Velox dependency is updated.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: GitHub Copilot CLI 1.0.89 (GPT-5.6 Sol)
   


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