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 builtinCastRealAsJSONSig #12673

Merged
merged 5 commits into from
Oct 14, 2019

Conversation

js00070
Copy link
Contributor

@js00070 js00070 commented Oct 13, 2019

What problem does this PR solve?

implement vectorized evaluation for builtinCastRealAsJSONSig mentioned at #12104

What is changed and how it works?

about 35% faster

BenchmarkVectorizedBuiltinCastFunc/builtinCastRealAsJSONSig-VecBuiltinFunc-4                       14770             79028 ns/op           13296 B/op       1662 allocs/op
BenchmarkVectorizedBuiltinCastFunc/builtinCastRealAsJSONSig-NonVecBuiltinFunc-4                    10993            107003 ns/op           14840 B/op       1855 allocs/op

Check List

Tests

  • Unit test

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

codecov bot commented Oct 13, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@876e794). Click here to learn what that means.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #12673   +/-   ##
===========================================
  Coverage          ?   80.4214%           
===========================================
  Files             ?        461           
  Lines             ?     107306           
  Branches          ?          0           
===========================================
  Hits              ?      86297           
  Misses            ?      14882           
  Partials          ?       6127

if buf.IsNull(i) {
result.AppendNull()
} else {
result.AppendJSON(json.CreateBinary(f64s[i]))
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add the comment above this line.

	// FIXME: `select json_type(cast(1111.11 as json))` should return `DECIMAL`, we return `DOUBLE` now.```

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

@XuHuaiyu XuHuaiyu added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 14, 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 14, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Oct 14, 2019

Your auto merge job has been accepted, waiting for 12640, 12220, 12584

@ngaut ngaut removed the status/LGT1 Indicates that a PR has LGTM 1. label Oct 14, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Oct 14, 2019

/run-all-tests

@sre-bot sre-bot merged commit fb273d9 into pingcap:master Oct 14, 2019
@js00070 js00070 deleted the pr2 branch November 7, 2019 11:07
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.

7 participants