[
https://issues.apache.org/jira/browse/SPARK-12028?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sean Owen updated SPARK-12028:
------------------------------
Assignee: Xiao Li
> [SQL] get_json_object is unable to return a correct result for null literals
> ----------------------------------------------------------------------------
>
> Key: SPARK-12028
> URL: https://issues.apache.org/jira/browse/SPARK-12028
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.6.0
> Reporter: Xiao Li
> Assignee: Xiao Li
> Fix For: 1.6.0, 2.0.0
>
>
> So far, our get_json_object returns the same results of output for the
> following two cases. Both results are "null":
> val tuple: Seq[(String, String)] = ("5", """{"f1": null}""") :: Nil
> val df: DataFrame = tuple.toDF("key", "jstring")
> val res = df.select(functions.get_json_object($"jstring",
> "$.f1")).collect()
> val tuple2: Seq[(String, String)] = ("5", """{"f1": "null"}""") :: Nil
> val df2: DataFrame = tuple2.toDF("key", "jstring")
> val res3 = df2.select(functions.get_json_object($"jstring",
> "$.f1")).collect()
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]