Hi guys, Sorry, I'm also interested in this nested json structure. I have a similar SQL in which I need to query a nested field in a json. Does the above query works if it is used with sql(sqlText) assuming the data is coming directly from hdfs via sqlContext.jsonFile?
The SPARK-2483 <https://issues.apache.org/jira/browse/SPARK-2483> seems to address only HiveQL. Best Regards, Jerry On Tue, Jul 15, 2014 at 3:38 AM, anyweil <wei...@gmail.com> wrote: > Thank you so much for the information, now i have merge the fix of #1411 > and > seems the HiveSQL works with: > SELECT name FROM people WHERE schools[0].time>2. > > But one more question is: > > Is it possible or planed to support the "schools.time" format to filter the > record that there is an element inside array of schools satisfy time > 2? > > The above requirement should be more general than the schools[0].time>2, as > we sometime don't know which element in the array should satisfy the > condition (we do not know if we should use 0 or 1 or X in the > schools[X].time), we only care if there is one satisfy the condition, thank > you! > > > > > > -- > View this message in context: > http://apache-spark-user-list.1001560.n3.nabble.com/Query-the-nested-JSON-data-With-Spark-SQL-1-0-1-tp9544p9741.html > Sent from the Apache Spark User List mailing list archive at Nabble.com. >