Skip to content
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

Merged
merged 6 commits into from
Apr 17, 2019
Merged

Conversation

breezewish
Copy link
Member

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)

  • New feature (change which adds functionality)

How has this PR been tested? (mandatory)

Unit test.

breezewish and others added 3 commits April 15, 2019 20:26
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 {
Copy link
Member

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?

Copy link
Member Author

@breezewish breezewish Apr 16, 2019

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

impl<T> super::ConcreteAggrFunctionState for AggrFnStateAvg<T>
(notice that the parser part is not included in this PR)

AndreMouche
AndreMouche previously approved these changes Apr 16, 2019
@@ -0,0 +1,361 @@
// Copyright 2019 PingCAP, Inc.
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reminding!

breezewish and others added 2 commits April 17, 2019 11:16
Signed-off-by: Breezewish <breezewish@pingcap.com>
@breezewish breezewish merged commit 895e485 into tikv:master Apr 17, 2019
@breezewish breezewish deleted the ___batch_extract/t5/2 branch April 17, 2019 14:09
@breezewish breezewish mentioned this pull request Apr 17, 2019
fredchenbj pushed a commit to fredchenbj/tikv that referenced this pull request Apr 24, 2019
Signed-off-by: Breezewish <breezewish@pingcap.com>
sticnarf pushed a commit to sticnarf/tikv that referenced this pull request Oct 27, 2019
Signed-off-by: Breezewish <breezewish@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants