[ https://issues.apache.org/jira/browse/SPARK-14034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maxim Gekk resolved SPARK-14034. -------------------------------- Resolution: Fixed Fix Version/s: 2.3.0 > Converting to Dataset causes wrong order and values in nested array of > documents > -------------------------------------------------------------------------------- > > Key: SPARK-14034 > URL: https://issues.apache.org/jira/browse/SPARK-14034 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 1.6.1 > Reporter: Steven She > Priority: Major > Fix For: 2.3.0 > > > I'm deserializing the following JSON document into a Dataset with Spark 1.6.1 > in the console: > {noformat} > {"arr": [{"c": 1, "b": 2, "a": 3}]} > {noformat} > I have the following case classes: > {noformat} > case class X(arr: Seq[Y]) > case class Y(c: Int, b: Int, a: Int) > {noformat} > I run the following in the console to retrieve the value of `c` in the array, > which should have a value of 1 in the data file, but I get the value 3 > instead: > {noformat} > scala> sqlContext.read.json("../test.json").as[X].collect().head.arr.head.c > res19: Int = 3 > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org