-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
The filter of outer table happens multiple time after optimizing in-subquery to join #4914
Labels
enhancement
New feature or request
Comments
This was referenced Jan 15, 2023
The ❯ explain verbose
select *
from t1
where exists
(
select 1 from t2 where t1.a = t2.a
)
and exists
(
select 1 from t2 where t1.b = t2.b
)
and t1.c > 0;
| logical_plan after decorrelate_where_exists | Projection: t1.a, t1.b, t1.c |
| | Filter: t1.c > Int32(0) --- filter |
| | LeftSemi Join: t1.b = t2.b |
| | Filter: t1.c > Int32(0) ---filter |
| | LeftSemi Join: t1.a = t2.a |
| | TableScan: t1 |
| | TableScan: t2 |
| | TableScan: t2 |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Create table:
run query:
The output plan of
decorrelate_where_in
:We can see
Filter: t1.c > Int32(10)
happen twice.Describe the solution you'd like
I would like to add the
Filter
only once.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: