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

executor: go generate builtin_control_vec.go #12140

Merged
merged 9 commits into from
Sep 12, 2019

Conversation

SunRunAway
Copy link
Contributor

@SunRunAway SunRunAway commented Sep 10, 2019

What problem does this PR solve?

part of #12058
Try to use go generate to generate all builtinIf{{ .TypeName }}Sig vector functions in builtin_control_vec.go along with test case and benchmarks.

  • next step: use ci to run go generate ./... and check incorrect modification with generated files.

What is changed and how it works?

goos: darwin
goarch: amd64
pkg: github.com/pingcap/tidb/expression
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfIntSig-EvalOneVec-12         	  300000	      3843 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfIntSig-EvalOneCol-12         	   30000	     64226 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfRealSig-EvalOneVec-12        	  300000	      3886 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfRealSig-EvalOneCol-12        	   30000	     50379 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfDecimalSig-EvalOneVec-12     	  200000	      6549 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfDecimalSig-EvalOneCol-12     	   20000	    169731 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfStringSig-EvalOneVec-12      	  200000	     10573 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfStringSig-EvalOneCol-12      	   20000	     58502 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfTimeSig-EvalOneVec-12        	  300000	      5170 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfTimeSig-EvalOneCol-12        	   20000	     75404 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfDurationSig-EvalOneVec-12    	  500000	      3848 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfDurationSig-EvalOneCol-12    	   30000	     41646 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfJSONSig-EvalOneVec-12        	  200000	     11993 ns/op
BenchmarkVectorizedBuiltinControlEvalOneVec/builtinIfJSONSig-EvalOneCol-12        	   10000	    117492 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfIntSig-VecBuiltinFunc-12           	  500000	      4068 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfIntSig-NonVecBuiltinFunc-12        	  100000	     21412 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfRealSig-VecBuiltinFunc-12          	  300000	      3971 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfRealSig-NonVecBuiltinFunc-12       	  100000	     19289 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfDecimalSig-VecBuiltinFunc-12       	  200000	      6466 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfDecimalSig-NonVecBuiltinFunc-12    	  100000	     18116 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfStringSig-VecBuiltinFunc-12        	  200000	     10393 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfStringSig-NonVecBuiltinFunc-12     	   50000	     23924 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfTimeSig-VecBuiltinFunc-12          	  300000	      5113 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfTimeSig-NonVecBuiltinFunc-12       	   50000	     27475 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfDurationSig-VecBuiltinFunc-12      	  300000	      3921 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfDurationSig-NonVecBuiltinFunc-12   	  100000	     19700 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfJSONSig-VecBuiltinFunc-12          	  100000	     12281 ns/op
BenchmarkVectorizedBuiltinControlFunc/builtinIfJSONSig-NonVecBuiltinFunc-12       	   50000	     29768 ns/op
PASS
ok  	github.com/pingcap/tidb/expression	52.836s

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

  • None

Related changes

  • None

Release note

  • None

@codecov
Copy link

codecov bot commented Sep 10, 2019

Codecov Report

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

@@             Coverage Diff             @@
##             master     #12140   +/-   ##
===========================================
  Coverage   81.2926%   81.2926%           
===========================================
  Files           454        454           
  Lines         98528      98528           
===========================================
  Hits          80096      80096           
  Misses        12717      12717           
  Partials       5715       5715

@zz-jason
Copy link
Member

/run-all-tests

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 10, 2019
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

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

sre-bot commented Sep 12, 2019

/run-all-tests

@sre-bot sre-bot merged commit 98b3aeb into pingcap:master Sep 12, 2019
@SunRunAway SunRunAway deleted the builtin_control_vec branch September 12, 2019 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression 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.

4 participants