Refactor expressions#550
Conversation
|
Thanks for the contribution! Please review the labels and make any necessary changes. |
Codecov Report
@@ Coverage Diff @@
## master #550 +/- ##
=======================================
- Coverage 81% 80% -2%
=======================================
Files 292 288 -4
Lines 13849 13758 -91
=======================================
- Hits 11290 11028 -262
- Misses 2559 2730 +171
Continue to review full report at Codecov.
|
| plan: Result<PlanNode>, | ||
| expect: &'static str | ||
| expect: &'static str, | ||
| err: &'static str |
There was a problem hiding this comment.
It is neat to add the expected error here.
There was a problem hiding this comment.
err is expected error msg, empty str for normal return.
| "{:?}:{:?}", | ||
| plan.exprs[i], | ||
| plan.schema().fields()[i].data_type() | ||
| plan.exprs[i].to_data_type(&plan.input.schema()).unwrap() |
There was a problem hiding this comment.
unwrap can cause panic. use ? operator
There was a problem hiding this comment.
It's for display, may need ErrorCodes to fmt error. We can make another pr to improve this.
| use crate::test::Test; | ||
| use crate::*; | ||
|
|
||
| // Copyright 2020-2021 The Datafuse Authors. |
There was a problem hiding this comment.
Should be move to file header
| /// ExpressionExecutor is a helper struct for expressions and projections | ||
| /// Aggregate functions is not covered, because all expressions in aggregate functions functions are executed. | ||
| #[derive(Debug, Clone)] | ||
| pub struct ExpressionExecutor { |
|
Feat! |
Summary
RFC: https://github.com/sundy-li/fuse-query/blob/action_dag/website/datafuse/docs/rfcs/query/2021-05-22-plan-expression-refactor.md
A complex Example
There are some main steps to go:
eg expressions:
eg:
Changelog
Related Issues
Test Plan