spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyukjin Kwon (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-30139) get_json_object does not work correctly
Date Thu, 12 Dec 2019 04:32:00 GMT

    [ https://issues.apache.org/jira/browse/SPARK-30139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16994171#comment-16994171
] 

Hyukjin Kwon commented on SPARK-30139:
--------------------------------------

[~rakson] Have you made some progresses on it?

> get_json_object does not work correctly
> ---------------------------------------
>
>                 Key: SPARK-30139
>                 URL: https://issues.apache.org/jira/browse/SPARK-30139
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.4.4
>            Reporter: Clemens Valiente
>            Priority: Major
>
> according to documentation:
> [https://spark.apache.org/docs/2.4.4/api/java/org/apache/spark/sql/functions.html#get_json_object-org.apache.spark.sql.Column-java.lang.String-]
> get_json_object "Extracts json object from a json string based on json path specified,
and returns json string of the extracted json object. It will return null if the input json
string is invalid."
>  
> the following SQL snippet returns null even though it should return 'a'
> {code}
> select get_json_object([{"id":123,"value":"a"},\{"id":456,"value":"b"}], $[?($.id==123)].value){code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message