[ 
https://issues.apache.org/jira/browse/SPARK-32789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Uhren updated SPARK-32789:
---------------------------------
    Description: 
It seems that wildcards (star) are not supported when using {{get_json_object}}:
{code:java}
spark.sql("""select get_json_object('{"k":{"value":"abc"}}', '$.*.value') as 
j""").show()
{code}
This results in {{null}} while it should return 'abc'. It works if I replace * 
with 'k'.

  !image-2020-09-03-13-22-38-569.png!

  was:
It seems that wildcards (*) are not supported when using {{get_json_object}}:
{code:java}
spark.sql("""select get_json_object('{"k":{"value":"abc"}}', '$.*.value') as 
j""").show()
{code}
This results in {{null}} while it should return 'abc'. It works if I replace * 
with 'k'.

!image-2020-09-03-13-20-07-982.png!

 


> Wildcards not working in get_json_object
> ----------------------------------------
>
>                 Key: SPARK-32789
>                 URL: https://issues.apache.org/jira/browse/SPARK-32789
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 2.4.4
>            Reporter: Thomas Uhren
>            Priority: Major
>         Attachments: image-2020-09-03-13-22-38-569.png
>
>
> It seems that wildcards (star) are not supported when using 
> {{get_json_object}}:
> {code:java}
> spark.sql("""select get_json_object('{"k":{"value":"abc"}}', '$.*.value') as 
> j""").show()
> {code}
> This results in {{null}} while it should return 'abc'. It works if I replace 
> * with 'k'.
>   !image-2020-09-03-13-22-38-569.png!



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to