eric-maynard opened a new pull request, #39519:
URL: https://github.com/apache/spark/pull/39519

   ### What changes were proposed in this pull request?
   Presently, only foldable expressions can be passed in to schema_of_json, 
e.g. `SCHEMA_OF_JSON(CONCAT('', ''))`.
   
   With this change, we accept _any_ string expression and infer the JSON 
schema if possible.
   
   ### Why are the changes needed?
   Users may have a column containing JSON strings, but today they can't find 
the schema of each record. With this change, finding the schema of a given 
column is possible.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, schema_of_json will now accept string expressions which are not 
foldable.
   
   
   ### How was this patch tested?
   New tests were added in `JsonFunctionsSuite`
   


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to