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: implement vectorized evaluation for 'builtinRandWithSeedSig' #12644

Merged
merged 14 commits into from
Nov 6, 2019
Merged

expression: implement vectorized evaluation for 'builtinRandWithSeedSig' #12644

merged 14 commits into from
Nov 6, 2019

Conversation

tsthght
Copy link
Contributor

@tsthght tsthght commented Oct 12, 2019

What problem does this PR solve?

expression: implement vectorized evaluation for 'builtinRandWithSeedSig', for #12105

What is changed and how it works?

BenchmarkVectorizedBuiltinMathFunc/builtinRandWithSeedSig-VecBuiltinFunc-8         	     100	  10981342 ns/op	 5554210 B/op	    2048 allocs/op
BenchmarkVectorizedBuiltinMathFunc/builtinRandWithSeedSig-NonVecBuiltinFunc-8      	     100	  11391656 ns/op	 5505037 B/op	    1024 allocs/op

Check List

Returns random numbers, so cannot write test cases

@sre-bot sre-bot added the contribution This PR is from a community contributor. label Oct 12, 2019
@codecov
Copy link

codecov bot commented Oct 12, 2019

Codecov Report

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

@@             Coverage Diff             @@
##             master     #12644   +/-   ##
===========================================
  Coverage   80.3931%   80.3931%           
===========================================
  Files           469        469           
  Lines        112542     112542           
===========================================
  Hits          90476      90476           
  Misses        15088      15088           
  Partials       6978       6978

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.

Please do a benchmark for it and post the result in the description.
For correct testing, let's discuss in this PR.

@tsthght
Copy link
Contributor Author

tsthght commented Oct 14, 2019

Please do a benchmark for it and post the result in the description.
For correct testing, let's discuss in this PR.

ok

@Reminiscent Reminiscent removed their request for review October 15, 2019 02:37
@tsthght tsthght requested a review from a team as a code owner October 15, 2019 05:30
@ghost ghost requested review from qw4990 and removed request for a team October 15, 2019 05:31
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.

Please consider write a separated test.

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.

Two randers with the same seed will generate the same number, so how about using this feature to add a correct test?

@tsthght
Copy link
Contributor Author

tsthght commented Oct 24, 2019

Please consider write a separated test.

I had Modified the implementation of both non-vec and vec. I don't know whether it's right. PTAL @SunRunAway @qw4990

expression/builtin_math.go Outdated Show resolved Hide resolved
@sre-bot
Copy link
Contributor

sre-bot commented Oct 31, 2019

@tsthght, please update your pull request.

@tsthght
Copy link
Contributor Author

tsthght commented Nov 6, 2019

/rebuild

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

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

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

sre-bot commented Nov 6, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Nov 6, 2019

@tsthght merge failed.

@qw4990
Copy link
Contributor

qw4990 commented Nov 6, 2019

/run-integration-common-test

@qw4990
Copy link
Contributor

qw4990 commented Nov 6, 2019

/run-unit-test

1 similar comment
@qw4990
Copy link
Contributor

qw4990 commented Nov 6, 2019

/run-unit-test

@qw4990 qw4990 merged commit 4bb68c5 into pingcap:master Nov 6, 2019
XiaTianliang pushed a commit to XiaTianliang/tidb that referenced this pull request Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression contribution This PR is from a community contributor. 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