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
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
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
ember where employee.name = 'employee0'
>
> Uploaded a test if some one want to try it out. NestedObjectTest.java
> <http://apache-spark-user-list.1001560.n3.nabble.com/file/n24853/NestedObjectTest.java>
>
>
>
>
>
> --
> View this message in cont
he-spark-user-list.1001560.n3.nabble.com/file/n24853/NestedObjectTest.java>
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/nested-collection-object-query-tp24853.html
Sent from the Apache Spark User List mailing list archi