[ https://issues.apache.org/jira/browse/SPARK-21804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sameer Agarwal updated SPARK-21804: ----------------------------------- Affects Version/s: (was: 2.2.0) 2.0.0 > json_tuple returns null values within repeated columns except the first one > --------------------------------------------------------------------------- > > Key: SPARK-21804 > URL: https://issues.apache.org/jira/browse/SPARK-21804 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.0.0 > Reporter: Jen-Ming Chung > Assignee: Jen-Ming Chung > Priority: Minor > Labels: starter > Fix For: 2.3.0 > > > I was testing json_tuple in extracting values from JSON but I found it could > actually returns null values within repeated columns except the first one as > below: > {code:language=scala} > scala> spark.sql("""SELECT json_tuple('{"a":1, "b":2}', 'a', 'b', > 'a')""").show() > +---+---+----+ > | c0| c1| c2| > +---+---+----+ > | 1| 2|null| > +---+---+----+ > {code} > I think this should be consistent with Hive's implementation: > {code:language=scala} > hive> SELECT json_tuple('{"a": 1, "b": 2}', 'a', 'a'); > ... > 1 1 > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org