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: modify the test framework for vectorized expression evaluation functions #12115

Merged
merged 6 commits into from
Sep 10, 2019

Conversation

Reminiscent
Copy link
Contributor

What problem does this PR solve?

Modify the test framework for vectorized expression evaluation functions.

What is changed and how it works?

Create a test file for each different kind of vectorized expression. Add corresponding cases to each individual test file. Pass the corresponding cases to the unit test and benchmark functions in bench_test.go in each test file. It can effectively reduce conflicts.

Check List

Tests

  • Unit test

@CLAassistant
Copy link

CLAassistant commented Sep 10, 2019

CLA assistant check
All committers have signed the CLA.

@@ -385,9 +369,9 @@ func genVecExprBenchCase(ctx sessionctx.Context, funcName string, testCase vecEx
return expr, input, output
}

func (s *testEvaluatorSuite) TestVectorizedEvalOneVec(c *C) {
func (s *testEvaluatorSuite) testVectorizedEvalOneVec(c *C, vecExprCases vecExprBenchCases) {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about adding some comments for contributors with those four functions/methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

update. PTAL

@codecov
Copy link

codecov bot commented Sep 10, 2019

Codecov Report

Merging #12115 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #12115   +/-   ##
===========================================
  Coverage   81.4145%   81.4145%           
===========================================
  Files           450        450           
  Lines         96947      96947           
===========================================
  Hits          78929      78929           
  Misses        12391      12391           
  Partials       5627       5627

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

@XuHuaiyu XuHuaiyu changed the title Expression: Modify the test framework for vectorized expression evaluation functions expression: modify the test framework for vectorized expression evaluation functions Sep 10, 2019
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

LGTM

@qw4990 qw4990 added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. labels Sep 10, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Sep 10, 2019

/run-all-tests

@qw4990 qw4990 merged commit add1023 into pingcap:master Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression component/test 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