-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Batch aggregation framework #4533
Conversation
Signed-off-by: Breezewish <breezewish@pingcap.com>
Signed-off-by: Breezewish <breezewish@pingcap.com>
fn test_type_match() { | ||
/// A state that accepts Int and outputs Real. | ||
#[derive(Clone, Debug)] | ||
struct AggrFnStateFoo { |
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 we implement an aggregation function directly in this PR as a sample so we needn't implement one in the test?
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.
I intentionally extracted them into different PRs because a fully functional aggr function implementation is not very short 🙃 For a real implementation, see
tikv/src/coprocessor/dag/aggr_fn/impl_avg.rs
Line 142 in ab507ab
impl<T> super::ConcreteAggrFunctionState for AggrFnStateAvg<T> |
src/coprocessor/dag/aggr_fn/mod.rs
Outdated
@@ -0,0 +1,361 @@ | |||
// Copyright 2019 PingCAP, Inc. |
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.
We need to change the license.
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 reminding!
Signed-off-by: Breezewish <breezewish@pingcap.com>
Signed-off-by: Breezewish <breezewish@pingcap.com>
Signed-off-by: Breezewish <breezewish@pingcap.com>
What have you changed? (mandatory)
The framework for batch aggregations. See unit test for examples of how to write aggregate functions under this framework.
Extracted from #3898
What are the type of the changes? (mandatory)
How has this PR been tested? (mandatory)
Unit test.