We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
EXPR LIKE 'constant'
expr = 'constant'
As @adriangb observes in #12978, there is often special case handling for equality predicates like col = 'foo'
col = 'foo'
However, sometimes people (or tools) write queries using the LIKE operator:
LIKE
SELECT ... WHERE col like 'foo'
I think it would be nice if DataFusion's simplifier could simplify such expressions to WHERE col = 'foo', something that trino does (see trinodb/trino@6aea881#diff-3b166584d367d2e1bf2184249d6bad632bb4ecbe18e011f4744fdf629c771ce7R912)
WHERE col = 'foo'
> explain select * from values ('foo'), ('bar') where column1 like 'foo'; +---------------+---------------------------------------------+ | plan_type | plan | +---------------+---------------------------------------------+ | logical_plan | Filter: column1 LIKE Utf8("foo") | | | Values: (Utf8("foo")), (Utf8("bar")) | | physical_plan | CoalesceBatchesExec: target_batch_size=8192 | | | FilterExec: column1@0 LIKE foo | | | ValuesExec | | | | +---------------+---------------------------------------------+ 2 row(s) fetched. Elapsed 0.006 seconds.
No response
@adriangb has implemented a version of this here: #13061
The text was updated successfully, but these errors were encountered:
@adriangb 's WIP: #13061
Sorry, something went wrong.
Hi! I'm just going through older issues, it looks like this one can be closed as of #13260, since #13061 got merged into that one?
Agreed -- thank you @ngli-me
Successfully merging a pull request may close this issue.
Is your feature request related to a problem or challenge?
As @adriangb observes in #12978, there is often special case handling for equality predicates like
col = 'foo'
However, sometimes people (or tools) write queries using the
LIKE
operator:Describe the solution you'd like
I think it would be nice if DataFusion's simplifier could simplify such expressions to
WHERE col = 'foo'
, something that trino does (see trinodb/trino@6aea881#diff-3b166584d367d2e1bf2184249d6bad632bb4ecbe18e011f4744fdf629c771ce7R912)Describe alternatives you've considered
No response
Additional context
@adriangb has implemented a version of this here: #13061
The text was updated successfully, but these errors were encountered: