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 'builtinCastDecimalAsJSONSig' #12803

Merged
merged 4 commits into from
Oct 18, 2019
Merged

expression: implement vectorized evaluation for 'builtinCastDecimalAsJSONSig' #12803

merged 4 commits into from
Oct 18, 2019

Conversation

tsthght
Copy link
Contributor

@tsthght tsthght commented Oct 17, 2019

What problem does this PR solve?

Implement vectorized evaluation for builtinCastDecimalAsJSONSig, for #12104

What is changed and how it works?

BenchmarkVectorizedBuiltinCastFunc/builtinCastDecimalAsJSONSig-VecBuiltinFunc-8         	    5000	    267764 ns/op	   63568 B/op	    3236 allocs/op
BenchmarkVectorizedBuiltinCastFunc/builtinCastDecimalAsJSONSig-NonVecBuiltinFunc-8      	    5000	    275238 ns/op	   63568 B/op	    3236 allocs/op

Check List

Tests

  • Unit test

@tsthght tsthght requested a review from a team as a code owner October 17, 2019 13:08
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Oct 17, 2019
@ghost ghost requested review from wshwsh12 and removed request for a team October 17, 2019 13:08
@wshwsh12 wshwsh12 requested a review from SunRunAway October 17, 2019 13:08
@codecov
Copy link

codecov bot commented Oct 17, 2019

Codecov Report

Merging #12803 into master will decrease coverage by 0.2912%.
The diff coverage is 70%.

@@               Coverage Diff                @@
##             master     #12803        +/-   ##
================================================
- Coverage   80.3562%   80.0649%   -0.2913%     
================================================
  Files           465        462         -3     
  Lines        108416     105874      -2542     
================================================
- Hits          87119      84768      -2351     
+ Misses        14945      14784       -161     
+ Partials       6352       6322        -30

for i := 0; i < n; i++ {
if buf.IsNull(i) {
result.AppendJSON(json.BinaryJSON{})
result.SetNull(i, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

The JSON type is not fixed-length, although these code works fine for now,
I think we should call result.AppendNull here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I had changed it.

Copy link
Contributor

@wshwsh12 wshwsh12 left a comment

Choose a reason for hiding this comment

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

LGTM

@wshwsh12 wshwsh12 requested a review from SunRunAway October 17, 2019 17:19
@wshwsh12 wshwsh12 added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 17, 2019
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 Oct 18, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Oct 18, 2019

/run-all-tests

@sre-bot sre-bot merged commit 48c1571 into pingcap:master Oct 18, 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/LGT1 Indicates that a PR has LGTM 1. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants