Fang Wen created SPARK-30330:
--------------------------------
Summary: 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.4, 2.4.3
Reporter: Fang Wen
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: [email protected]
For additional commands, e-mail: [email protected]