RE: nested collection object query

2015-09-29 Thread java8964
Manual+UDF#LanguageManualUDF-CollectionFunctions Yong From: tridib.sama...@live.com To: java8...@hotmail.com; user@spark.apache.org Subject: RE: nested collection object query Date: Mon, 28 Sep 2015 23:02:41 -0700 Well I figure out a way to use explode. But it returns two rows if there is two match in ne

RE: nested collection object query

2015-09-28 Thread Tridib Samanta
eturn true if it matches the condition and returns the parent object. From: tridib.sama...@live.com To: java8...@hotmail.com; user@spark.apache.org Subject: RE: nested collection object query Date: Mon, 28 Sep 2015 22:26:46 -0700 Thanks for you response Yong! Array syntax works fine. But I am no

RE: nested collection object query

2015-09-28 Thread Tridib Samanta
java8...@hotmail.com To: tridib.sama...@live.com; user@spark.apache.org Subject: RE: nested collection object query Date: Mon, 28 Sep 2015 20:42:11 -0400 Your employee in fact is an array of struct, not just struct. If you are using HiveSQLContext, then you can refer it like following: select id from m

RE: nested collection object query

2015-09-28 Thread java8964
Your employee in fact is an array of struct, not just struct. If you are using HiveSQLContext, then you can refer it like following: select id from member where employee[0].name = 'employee0' The employee[0] is pointing to the 1st element of the array. If you want to query all the elements in the