Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wolffcm opened this issue May 16, 2023 · 1 comment · Fixed by #6369
Closed

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

wolffcm opened this issue May 16, 2023 · 1 comment · Fixed by #6369
Labels
enhancement New feature or request

Comments

@wolffcm
Copy link
Contributor

wolffcm commented May 16, 2023

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

@wolffcm wolffcm added the enhancement New feature or request label May 16, 2023
@wolffcm wolffcm changed the title Support simplifying expressions like str ~ '^$' Support simplifying expressions like str ~ '^foo$' May 16, 2023
@wolffcm
Copy link
Contributor Author

wolffcm commented May 16, 2023

I am currently working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant