aboutsummaryrefslogtreecommitdiff
path: root/R/pkg/inst/tests/test_sparkSQL.R
diff options
context:
space:
mode:
authorgatorsmile <gatorsmile@gmail.com>2015-11-27 22:44:08 -0800
committerDavies Liu <davies.liu@gmail.com>2015-11-27 22:44:08 -0800
commit149cd692ee2e127d79386fd8e584f4f70a2906ba (patch)
treea45cf5193210c41be7e441b0c9543c3c40c5bd8f /R/pkg/inst/tests/test_sparkSQL.R
parentb9921524d970f9413039967c1f17ae2e736982f0 (diff)
downloadspark-149cd692ee2e127d79386fd8e584f4f70a2906ba.tar.gz
spark-149cd692ee2e127d79386fd8e584f4f70a2906ba.tar.bz2
spark-149cd692ee2e127d79386fd8e584f4f70a2906ba.zip
[SPARK-12028] [SQL] get_json_object returns an incorrect result when the value is null literals
When calling `get_json_object` for the following two cases, both results are `"null"`: ```scala 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() ``` ```scala 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() ``` Fixed the problem and also added a test case. Author: gatorsmile <gatorsmile@gmail.com> Closes #10018 from gatorsmile/get_json_object.
Diffstat (limited to 'R/pkg/inst/tests/test_sparkSQL.R')
0 files changed, 0 insertions, 0 deletions