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

   ## What changes are proposed in this pull request?
   
   Fixes #13795.
   
   Restore Spark struct field names at the input to native `to_json` with a 
positional cast. This keeps key case and field order without changing the types 
sent to other expressions. It also works for structs nested in arrays and map 
values when the native cast passes validation.
   
   Keep Spark fallback for explicit JSON options, field names that Velox cannot 
JSON-escape, and name-based casts when a rename is needed. Do not change the 
global cast behavior.
   
   ## How was this patch tested?
   
   - Built Gluten on Spark 3.5.5 with JDK 17 and ran 
`JsonFunctionsValidateSuite` against the public x86 Velox CI libraries from run 
45530016147: 17 tests passed.
   - Checked Spark output and native plans for a Parquet struct column, an 
array and map value containing structs, and nested fields that differ only by 
case. Checked fallback with explicit options, a quoted key, and name-based 
casts.
   - Spotless, license header checks, and `git diff --check` passed.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI 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]

Reply via email to