-
Notifications
You must be signed in to change notification settings - Fork 613
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): optimizing vanilla min
/max
on index/pk
#8337
Conversation
Signed-off-by: Clearlove <yifei.c.wei@gmail.com>
Signed-off-by: Clearlove <yifei.c.wei@gmail.com>
min
/max
on index/pkmin
/max
on index/pk
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.
Rest LGTM. Good job!
static ref AGG_ON_INDEX: OptimizationStage = OptimizationStage::new( | ||
static ref TOP_N_ON_INDEX: OptimizationStage = OptimizationStage::new( | ||
"Agg on Index", | ||
vec![TopNOnIndexRule::create()], | ||
ApplyOrder::TopDown, | ||
); | ||
|
||
static ref MIN_MAX_ON_INDEX: OptimizationStage = OptimizationStage::new( | ||
"Min/Max on Index", | ||
vec![MinMaxOnIndexRule::create()], | ||
ApplyOrder::TopDown, | ||
); |
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.
Could you please merge these two stages? I intend to group rules that serve a similar function together.
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.
Thanks for pointing this out!
Co-authored-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Clearlove yifei.c.wei@gmail.comI hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Vanilla
min
andmax
on index/pk for batch execution is optimized.An optimizer rule
MinMaxOnIndexRule
that optimizes "no group key, no distinct, no filter, no order_by, single-fielded"min
andmax
.Checklist For Contributors
./risedev check
(or alias,./risedev c
)Checklist For Reviewers
Related Issues
#7991, #7481