nookcreed opened a new issue, #13795:
URL: https://github.com/apache/gluten/issues/13795

   ### Backend
   
   VL (Velox)
   
   ### Description
   
   In a case-insensitive Spark session, Gluten falls back to Spark for 
`to_json` on a struct with uppercase field names. Spark treats these names as 
JSON keys and preserves their case. The Velox serializer uses the field names 
in its input type, which Gluten normally lowercases for case-insensitive 
analysis.
   
   ```sql
   SET spark.sql.caseSensitive=false;
   SELECT to_json(named_struct('UserId', id)) FROM range(2);
   ```
   
   The results should be `{"UserId":0}` and `{"UserId":1}` with a native 
projection. The current fallback keeps the correct result but prevents offload. 
The same issue applies to structs in arrays and map values. The projection 
should still fall back when it cannot safely reproduce Spark's JSON output.
   
   ### Versions
   
   Apache Gluten `main`, Velox backend, Spark 3.5.
   
   Related: #5504. This issue was written with the assistance of OpenAI ChatGPT.
   


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