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

   ## What changes are proposed in this pull request?
   
   Route Spark ROUND through the corrected Velox `spark_round` and
   `decimal_spark_round` integration aliases, enabling qualified negative scales
   without invoking Gluten's older bare-`round` overlay.
   
   - Validate exact native capability even when optional general native
     validation is disabled. Missing or unavailable capability means Spark
     fallback; never retry older bare names.
   - Preserve Spark's resolved decimal result type and typed NULL scale instead
     of passing through the legacy decimal ROUND transformer in the Velox path.
   - Carry captured ANSI mode as a native BOOLEAN argument for integral ROUND.
   - Serialize complete native argument signatures, including synthetic ANSI
     mode, for both ROUND and BROUND.
   - Share the qualified scale/JVM limits. Native scales are **[-400,400]**;
     nonzero FLOAT/DOUBLE scales require JDK21. Other cases retain Spark 
execution.
   - Preserve other backends' default decimal transformation and leave the
     existing bare-name overlay untouched.
   
   This is a **dependent draft**, stacked on the BROUND companion:
   https://github.com/apache/gluten/pull/13047
   
   It also requires the new upstream Velox ROUND implementation:
   https://github.com/facebookincubator/velox/pull/19141
   
   Related correctness issue:
   https://github.com/facebookincubator/velox/issues/10929
   
   The current base-main diff includes the unmerged BROUND prerequisite. Its
   follow-up ROUND commit can be reviewed independently. Before merging, the new
   native aliases must reach Gluten's compatible pinned dependency; this PR does
   not add a temporary CI patch or claim the stock pin is ready.
   
   ## How was this patch tested?
   
   - Built the public IBM Velox `dft-2026_09_22` dependency with the exact 
public
     ROUND/BROUND implementation patch and rebuilt the native Gluten backend.
   - Eight focused native execution/mapping tests passed, including corrected
     alias results while the old bare-name overlay remains registered.
   - Sixteen API tests and seventeen full Spark 4.1 ROUND/BROUND integration
     tests passed on **each of JDK17 and JDK21**.
   - Tests cover all numeric families, negative-scale HALF_UP ties, the public
     issue's floating regressions, decimal precision/storage transitions, typed
     NULL scale, overflow and captured-mode changes after analysis/physical
     planning. They compare schemas, floating bits and actual execution plans.
   - Tested the new capability gate against the **actual unpatched dependency**:
     the explicit fallback check passes with general native validation disabled.
     That whole negative-control run deliberately includes failing 
native-positive
     expectations; it is not reported as an all-green suite.
   - Three signature assertions failed before correcting compound type metadata;
     full ROUND/BROUND integration was rerun after the fix.
   - The native implementation's public Spark differential qualification uses
     **6,211,509 distinct main inputs / 12,423,018 LEGACY+ANSI cases per
     function/vector shape**, plus dense/exhaustive supplements, with zero
     mismatches in the declared domain. JDK17 nonzero floating scales are
     explicitly excluded from native qualification and retain Spark execution.
   
   Public dependency:
   https://github.com/IBM/velox/tree/dft-2026_09_22
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: GitHub Copilot CLI 1.0.87-0; OpenAI models.
   


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