Skip to content

Support simplifying expressions like ~ ^(bar|foo)$ #6488

@tanruixiang

Description

@tanruixiang

Is your feature request related to a problem or challenge?

Support simplifying expressions like ~ ^(bar|foo)$ , This will help the subsequent optimizer to perform related optimizations such as predicate push-down.

str = ~ ^(bar|foo)$
could be rewritten as
str = bar or str = foo

Describe the solution you'd like

Optimization for regular expressions of the form like ^(bar|foo)$ is supported in the existing simplify_regex_expr.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions