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 6 commits into from Apr 17, 2019


None yet
3 participants
Copy link

commented Apr 15, 2019

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.

breeswish added some commits Apr 15, 2019

Adds VectorValueExt
Signed-off-by: Breezewish <>
Adds Aggregation framework
Signed-off-by: Breezewish <>
fn test_type_match() {
/// A state that accepts Int and outputs Real.
#[derive(Clone, Debug)]
struct AggrFnStateFoo {

This comment has been minimized.

Copy link

AndreMouche Apr 16, 2019


Could we implement an aggregation function directly in this PR as a sample so we needn't implement one in the test?

This comment has been minimized.

Copy link

breeswish Apr 16, 2019

Author Member

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)

@@ -0,0 +1,361 @@
// Copyright 2019 PingCAP, Inc.

This comment has been minimized.

Copy link

rleungx Apr 16, 2019


We need to change the license.

This comment has been minimized.

Copy link

breeswish Apr 17, 2019

Author Member

Thanks for reminding!

breeswish added some commits Apr 17, 2019

Fix header
Signed-off-by: Breezewish <>

@breeswish breeswish merged commit 895e485 into tikv:master Apr 17, 2019

2 checks passed

DCO All commits are signed off!
idc-jenkins-ci/test Jenkins job succeeded.

@breeswish breeswish deleted the breeswish:___batch_extract/t5/2 branch Apr 17, 2019

@breeswish breeswish referenced this pull request Apr 17, 2019


Adds VectorValueExt #4532

fredchenbj added a commit to fredchenbj/tikv that referenced this pull request Apr 24, 2019

Batch aggregation framework (tikv#4533)
Signed-off-by: Breezewish <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.