-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Conversation
expression/bench_test.go
Outdated
@@ -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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update. PTAL
Codecov Report
@@ Coverage Diff @@
## master #12115 +/- ##
===========================================
Coverage 81.4145% 81.4145%
===========================================
Files 450 450
Lines 96947 96947
===========================================
Hits 78929 78929
Misses 12391 12391
Partials 5627 5627 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
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