spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rakesh Raushan (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-31009) Support json_object_keys function
Date Tue, 03 Mar 2020 05:21:00 GMT

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

Rakesh Raushan commented on SPARK-31009:
----------------------------------------

[~hyukjin.kwon] I updated the description. PostgreSQL supports this function.

We can use `from_json` to convert json to `MapType` and then extract the keys, but that won't
be optimal.

 

Apart from this one, there are some json function that supported by PostgreSQL, prestro, redshift,teradata.

May be we can discuss on supporting some of them. I have already raised a PR for `json_array_length`.
This is supported by all of the above mentioned DBMSs.

> Support json_object_keys function
> ---------------------------------
>
>                 Key: SPARK-31009
>                 URL: https://issues.apache.org/jira/browse/SPARK-31009
>             Project: Spark
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Rakesh Raushan
>            Priority: Major
>
> This function will return all the keys from outer json object.
>  
> PostgreSQL support this function -> [https://www.postgresql.org/docs/9.3/functions-json.html]



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