-
Notifications
You must be signed in to change notification settings - Fork 999
Closed
Description
I'm trying to query an array in ElasticSearch
data: "names":[{"name":"allen"},{"name":"bill"},{"name":"dave"},{"name":"poter"}]
goal: "select names from table where array_contains(names.name, "bill")"
but spark won't do predicate pushdown if SQL statement use array_contains function.
hint: names.name = ["allen","bill","dave","poter"]
I've tried
select * from table where array_contains(names.name,"bill")
-- and
select explode(names.name) as name from table as t1;select * from t1 where name = "bill"
-- and
select * from table where cast(names.name as string) like '%bill%'
All failed to do pushdown, any other ways to do it?