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

expression: Support stddev_pop function #19195

Merged
merged 14 commits into from
Aug 27, 2020
Merged

expression: Support stddev_pop function #19195

merged 14 commits into from
Aug 27, 2020

Conversation

Win-Man
Copy link
Contributor

@Win-Man Win-Man commented Aug 14, 2020

What problem does this PR solve?

Issue Number: Part of #7623

Problem Summary:

What is changed and how it works?

Proposal: xxx

What's Changed:

How it Works:

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

Side effects

Release note

  • Support stddev_pop function.

@Win-Man Win-Man requested a review from a team as a code owner August 14, 2020 03:22
@Win-Man Win-Man requested review from qw4990 and removed request for a team August 14, 2020 03:22
// return variance
//}

func (e *stdDevPop4Float64) UpdatePartialResult(sctx sessionctx.Context, rowsInGroup []chunk.Row, pr PartialResult) (memDelta int64, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You do not need to implement this function, just let stdDevPop4Float64 inherit from varPop4Float64, and override the AppendFinalResult2Chunk method.

executor/aggfuncs/func_stddevpop.go Show resolved Hide resolved
@Win-Man Win-Man requested a review from a team as a code owner August 14, 2020 09:01
@Win-Man Win-Man requested review from winoros and removed request for a team August 14, 2020 09:01
executor/aggfuncs/builder.go Outdated Show resolved Hide resolved
Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 19, 2020
@SunRunAway SunRunAway requested a review from XuHuaiyu August 19, 2020 07:29
@SunRunAway
Copy link
Contributor

@winoros @XuHuaiyu PTAL

@SunRunAway SunRunAway changed the title *: Support stddev_pop function expression: Support stddev_pop function Aug 19, 2020
@github-actions github-actions bot added the sig/execution SIG execution label Aug 20, 2020
@SunRunAway SunRunAway requested a review from ichn-hu August 25, 2020 02:54
Copy link
Contributor

@ichn-hu ichn-hu left a comment

Choose a reason for hiding this comment

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

Rest LGTM.

chk.AppendNull(e.ordinal)
return nil
}
varicance := p.variance / float64(p.count)
Copy link
Contributor

Choose a reason for hiding this comment

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

s/varicance/variance/

chk.AppendNull(e.ordinal)
return nil
}
varicance := p.variance / float64(p.count)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto.

executor/aggfuncs/builder.go Show resolved Hide resolved
@ichn-hu
Copy link
Contributor

ichn-hu commented Aug 27, 2020

LGTM

@ti-srebot
Copy link
Contributor

@ichn-hu,Thanks for your review. However, LGTM is restricted to Reviewers or higher roles.See the corresponding SIG page for more information. Related SIGs: execution(slack).

Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Aug 27, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Aug 27, 2020
@SunRunAway
Copy link
Contributor

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 27, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 49af6a5 into pingcap:master Aug 27, 2020
ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Aug 27, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-3.0 in PR #19540

ti-srebot pushed a commit to ti-srebot/tidb that referenced this pull request Aug 27, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #19541

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants