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

Coprocessor: Support SUM() #4797

Merged
merged 13 commits into from May 30, 2019
Merged

Conversation

breezewish
Copy link
Member

@breezewish breezewish commented May 28, 2019

What have you changed? (mandatory)

This PR adds batch aggregate function SUM() for all data types.

What are the type of the changes? (mandatory)

  • New feature (change which adds functionality)

How has this PR been tested? (mandatory)

New unit tests

@breezewish breezewish added the sig/coprocessor SIG: Coprocessor label May 29, 2019
@breezewish
Copy link
Member Author

/run-integration-tests

lonng
lonng previously approved these changes May 29, 2019
@lonng lonng added the status/LGT1 Status: PR - There is already 1 approval label May 29, 2019
…/2_sum

Signed-off-by: Breezewish <breezewish@pingcap.com>
Copy link
Contributor

@sticnarf sticnarf left a comment

Choose a reason for hiding this comment

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

LGTM.
But I realize that the test of both SUM and AVG uses Real type, so the decimal implementation of Summable is not covered in unit tests. Also, unit tests for cast functions are also missing.

@breezewish
Copy link
Member Author

@sticnarf The integration test of AVG is AVG(Int), which covers AVG(Decimal) as well as CastIntAsDecimal. For SUM, it covers SUM(Bytes) which will be SUM(Real) finally and covers CastStringAsReal.

@breezewish
Copy link
Member Author

/run-integration-tests

@sticnarf
Copy link
Contributor

@sticnarf The integration test of AVG is AVG(Int), which covers AVG(Decimal) as well as CastIntAsDecimal. For SUM, it covers SUM(Bytes) which will be SUM(Real) finally and covers CastStringAsReal.

Got it...

@breezewish breezewish added status/LGT2 Status: PR - There are already 2 approvals and removed status/LGT1 Status: PR - There is already 1 approval labels May 30, 2019
@breezewish
Copy link
Member Author

/run-integration-tests

@breezewish breezewish merged commit 9208525 into tikv:master May 30, 2019
@breezewish breezewish deleted the ___batch_extract/t8/2_sum branch May 30, 2019 08:17
breezewish added a commit to breezewish/tikv that referenced this pull request Jun 12, 2019
Signed-off-by: Breezewish <breezewish@pingcap.com>
breezewish added a commit to breezewish/tikv that referenced this pull request Jun 12, 2019
Signed-off-by: Breezewish <breezewish@pingcap.com>
breezewish added a commit to breezewish/tikv that referenced this pull request Jun 12, 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
sig/coprocessor SIG: Coprocessor status/LGT2 Status: PR - There are already 2 approvals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants