-
Notifications
You must be signed in to change notification settings - Fork 596
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
feat(optimizer): refine the conversion from Join to Dynamic Filter #5789
Conversation
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
…port-more-patterns Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Codecov Report
@@ Coverage Diff @@
## main #5789 +/- ##
=======================================
Coverage 75.01% 75.01%
=======================================
Files 916 916
Lines 143471 143495 +24
=======================================
+ Hits 107621 107649 +28
+ Misses 35850 35846 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
LGTM
- name: | | ||
With Top-1 on inner side | ||
TODO: currently not possible due to https://github.com/risingwavelabs/risingwave/issues/5764 | ||
before: | ||
- create_tables | ||
sql: | | ||
with max_v2 as (select v2 max from t2 order by v2 desc limit 1) select v1 from t1, max_v2 where v1 > max; |
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.
Interesting.
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.
Some off-topic idea. Maybe we can support more range conditions than simple >
, >=
, <
, <=
.
e.g. between
with max_v2 as (select max(v2) max from t2) select v1 from t1, max_v2 where v1 between max - 100 and max + 100;
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.
Exactly, we can support arbitrary range in the future.
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.
LGTM, btw the LogicalJoin::to_stream
is too long... It should be split into multiple functions. Maybe I will do it later
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR refines the conversion from Join to Dynamic Filter.
Also add some planner tests.
Note that some patterns can not be planned now due to pk derivation of hash join. Check the issue below.
Checklist
./risedev check
(or alias,./risedev c
)Refer to a related PR or issue link (optional)