Skip to content

[FEATURE] Extend predicate pushdown to support In, Like, and Regex filters #705

Description

@lawofcycles

Is your feature request related to a problem?

The current predicate pushdown implementation in OpenSearchRelation.translateFilter handles basic comparison operators but leaves some filters unhandled, causing Spark to process them in memory after fetching data from OpenSearch.

Notably, In filters are explicitly marked as unhandled in unhandledFilters, meaning all values matching an IN clause are fetched and filtered on the Spark side.

What solution would you like?

Extend translateFilter to support additional filter types:

Spark Filter OpenSearch Query
In(field, values) terms query
StringContains with wildcards wildcard query
Regex patterns regexp query

What alternatives have you considered?

Leaving these filters to Spark. This works correctly but transfers unnecessary data over the network.

Do you have any additional context?

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions