-
Notifications
You must be signed in to change notification settings - Fork 752
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(planner): implement aggregate operator in new planner framework #5027
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Thanks for the contribution! Please review the labels and make any necessary changes. |
Currently, the ticket can't produce results due to two known reasons: But, it's time to review, ensure me on the right road. And if the ticket is ok, I think we can merge it and make it work in next tickets. |
Conflicts need resolved :/ |
scalar_exprs.push( | ||
scalar_binder | ||
.bind_expr(arg, bind_context)? | ||
.as_any() |
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.
maybe move .as_any().downcast_ref.ok_or_else
into ScalarExprRef
is better?
impl ScalarExpr {
pub fn safe_cast<To>(&self) -> Result<To> {
self.as_any().downcast_ref::<To>().ok_or_else(|| {...})
}
}
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.
Nice idea!
col_binding | ||
.scalar | ||
.as_ref() | ||
.unwrap() |
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.
unwrap.
Wow, it works in my local ! mysql> set enable_planner_v2=1;
Query OK, 0 rows affected (0.02 sec)
Read 0 rows, 0 B in 0.002 sec., 0 rows/sec., 0 B/sec.
mysql> select sum(a) from t group by a;
+----------+
| sum(a_0) |
+----------+
| 1 |
| 2 |
+----------+
2 rows in set (0.04 sec)
Read 2 rows, 8 B in 0.008 sec., 262.05 rows/sec., 1.05 KB/sec. Will update PR after sorting out code 😄 |
Some conflicts that must be resolved :D |
Ok, now start to solve conflicts and use |
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
Changelog
Related Issues
Fixes #3749 #5066