Skip to content

Does array search support push down? #1076

@Mvpanswer7

Description

@Mvpanswer7

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions