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
New analyzer pass to optimize in single value #61564
New analyzer pass to optimize in single value #61564
Conversation
This is an automated comment for commit 97bd6ec with description of existing statuses. It's updated for the latest CI running ✅ Click here to open a full report in a separate page Successful checks
|
9a96858
to
d2d5f3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of failures regarding type mismatch and applying equal
to an integer and a list
I added error handling logic. If resolveFunction fails, the conversion will be abandoned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good in general, described my thoughts below
@@ -0,0 +1,11 @@ | |||
#pragma once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of creating a .h
files for equals
and notEquals
? I think we can avoid this behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will also use it for other subsequent optimizations, which can be better reused through .h
select '-------------------'; | ||
explain query tree select * from test where x not in ('a') SETTINGS allow_experimental_analyzer = 1; | ||
select '-------------------'; | ||
select * from test where x not in (NULL) SETTINGS allow_experimental_analyzer = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also good to check explain query
for this query and other cases, that do not support this conversion (x in array and x in tuple)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
This improvement has introduced many problems:
I'm reverting it and removing it from 23.3. Please reintroduce it with proper fixes and settings. |
Revert "Merge pull request #61564 from liuneng1994/optimize_in_single_value"
…ng1994/optimize_in_single_value"
I will fix it, and add a new settings. Maybe I need to think about how to do type checking or conversion correctly. |
…e_in_single_value" This reverts commit b2e764f.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
add a new analyzer pass to optimize in single value
A new pass rule.
convert
to
convert
to
This conversion can achieve better performance when there is only one value.