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

   ## What changes are proposed in this pull request?
   
   Route Spark's Encode expression and its Spark 4.x StaticInvoke replacement 
through a backend hook. The Velox implementation validates the captured charset 
and coding-error policies, canonicalizes permitted aliases, and lowers the four 
Spark arguments to the native two-string signature.
   
   The supported charset subset is US-ASCII, ISO-8859-1, UTF-8, UTF-16, 
UTF-16BE, UTF-16LE and UTF-32. Dynamic, null, invalid and unsupported charset 
expressions fall back to Spark. Aliases are canonicalized only when the 
expression permits legacy Java charsets.
   
   Propagate Spark's coding-error action into Velox query configuration, using 
replacement semantics for Spark 3.x and the registered Spark default for 4.0, 
4.1 and 4.2. Offload requires replacement mode matching the expression's 
captured policy. Strict mode remains on Spark because native strict errors do 
not yet preserve Spark's structured character-coding exception.
   
   Add `spark.gluten.sql.native.encode.enabled`, enabled by default and used 
only by the Velox backend. Spark 4.x's default strict mode still falls back. 
Preserve the existing direct-expression behavior of other backends.
   
   Add transformer/configuration regressions, JVM-versus-native SQL comparisons 
over non-foldable input, and a Spark 4.1 native/fallback regression. Cases 
include UTF-16 BOMs, UTF-32, non-ASCII and supplementary characters, 
representability boundaries, malformed UTF-8, empty/null inputs, aliases, 
dynamic charsets and the disable switch.
   
   Decode and native codec implementation changes are out of scope.
   
   ## How was this patch tested?
   
   Passed:
   
   - Repository Scala formatting application and check.
   - License-header checks for every changed source file.
   - Git whitespace/error checks.
   - Source-level review against the pinned native encode implementation and 
public Spark contracts.
   
   Pending before this draft is ready for review:
   
   - Native and JVM compilation, Spark/native runtime tests and performance 
validation have not been run.
   - C++ formatting with the required clang-format-15 is blocked because that 
version is unavailable.
   - Configuration-document regeneration has not been run because its script 
compiles and executes tests. The new configuration row was updated directly.
   
   The codec implementation already exists in the pinned dependency; no 
dependency update is proposed. Rebuild the native backend before validating the 
updated JVM integration.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: GitHub Copilot CLI 1.0.105 (GPT-6.1 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]

  • [PR] [CORE] Add parity-gated ... minni31 (via GitHub) via commits

Reply via email to