Skip to content

Support simplifying expressions like str ~ '^foo$' #6367

@wolffcm

Description

@wolffcm

Is your feature request related to a problem or challenge?

It would be nice if predicates that look like

str ~ '^foo$'

could be rewritten as

str = 'foo'

And likewise,

str !~ '^foo$'

could be rewritten as

str != 'foo'

Describe the solution you'd like

It would be straightforward to extend the expression simplifier to do this.

Describe alternatives you've considered

This seems pretty uncontroversial so I haven't considered any alternatives.

Additional context

This is relevant to InfluxQL support in IOx: https://github.com/influxdata/influxdb_iox/issues/6902

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