howz97 opened a new issue, #13251: URL: https://github.com/apache/gluten/issues/13251
### Backend VL (Velox) ### Bug description ## Description Spark's `from_json` matches JSON object keys against schema field names in a case-sensitive manner, regardless of the value of `spark.sql.caseSensitive`. When `spark.sql.caseSensitive=false`, Gluten lowercases struct field names while converting the `JsonToStructs` return type to Substrait. This changes the schema passed to the native backend and produces results inconsistent with vanilla Spark. ## Reproduction Note: implementation of `from_json` in [bolt](https://github.com/bytedance/bolt) is case-sensitive Use bolt as the backend of gluten: ```sql SET spark.sql.caseSensitive=false; SET spark.gluten.enabled=true; CREATE TABLE json_schema_case_repro USING parquet AS SELECT '{"Id":"10", "Value":"11"}' AS txt; SELECT from_json(txt, 'Id STRING, Value STRING') AS result FROM json_schema_case_repro; ``` ### Expected {"Id":"10","Value":"11"} ### Actual {"Id":null,"Value":null} ### Gluten version main branch ### Spark version Spark-3.5.x ### Spark configurations _No response_ ### System information _No response_ ### Relevant logs ```bash ``` -- 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]
