GitHub user HyukjinKwon opened a pull request:

    https://github.com/apache/spark/pull/22775

    [SPARK-24709][SQL][FOLLOW-UP] Make schema_of_json's input json as literal 
only

    ## What changes were proposed in this pull request?
    
    The main purpose of `schema_of_json` is the usage of combination with 
`from_json` (to make up the leak of schema inference) which takes its schema 
only as literal; however, currently `schema_of_json` allows JSON input as 
non-literal expressions (e.g, column).
    
    This was mistakenly allowed - we don't have to take other usages rather 
then the main purpose into account for now.
    
    This PR makes a followup to only allow literals for `schema_of_json`'s JSON 
input. We can allow non literal expressions later when it's needed or there are 
some usecase for it.
    
    ## How was this patch tested?
    
    Unit tests were added.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/HyukjinKwon/spark SPARK-25447-followup

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/22775.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #22775
    
----
commit 2705aa8739ecfc1d2ea8aea40082734084f36514
Author: hyukjinkwon <gurwls223@...>
Date:   2018-10-19T06:40:58Z

    Make schema_of_json's input json as liternal only

----


---

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

Reply via email to