You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Fang Wen (Jira)" <ji...@apache.org> on 2019/12/23 08:07:00 UTC

[jira] [Updated] (SPARK-30330) Support single quotes json parsing for get_json_object and json_tuple

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

Fang Wen updated SPARK-30330:
-----------------------------
    Labels: release-notes  (was: )

> Support single quotes json parsing for get_json_object and json_tuple
> ---------------------------------------------------------------------
>
>                 Key: SPARK-30330
>                 URL: https://issues.apache.org/jira/browse/SPARK-30330
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.4.3, 2.4.4
>            Reporter: Fang Wen
>            Priority: Major
>              Labels: release-notes
>
> I execute some query as
> {code:java}
>  select get_json_object(ytag, '$.y1') AS y1 from t4{code}
> SparkSQL return null but Hive return correct results. 
> In my production environment, ytag is a json wrapped by single quotes,as follows
> {code:java}
> {'y1': 'shuma', 'y2': 'shuma:shouji'}
> {'y1': 'jiaoyu', 'y2': 'jiaoyu:gaokao'}
> {'y1': 'yule', 'y2': 'yule:mingxing'}
> {code}
> Then l realized some functions including get_json_object and json_tuple does not support single quotes json parsing. It will return null for this situation.
> I think such a treatment is unfriendly for users.



--
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