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 builtinCastStringAsDurationSig #13807

Merged
merged 38 commits into from
Feb 7, 2020

Conversation

SilvaXiang
Copy link
Contributor

@SilvaXiang SilvaXiang commented Nov 28, 2019

What problem does this PR solve?

expression: implement vectorized evaluation for builtinCastStringAsDurationSig from #12176

What is changed and how it works?

2.7% faster than before:

BenchmarkVectorizedBuiltinCastFunc/builtinCastStringAsDurationSig-VecBuiltinFunc-4                   660           1755315 ns/op          114721 B/op       9203 allocs/op
BenchmarkVectorizedBuiltinCastFunc/builtinCastStringAsDurationSig-NonVecBuiltinFunc-4                650           1805265 ns/op          114722 B/op       9203 allocs/op

Check List

Tests

  • Unit test

…urationSig`

expression: implement vectorized evaluation for `builtinCastStringAsDurationSig`
@SilvaXiang SilvaXiang requested a review from a team as a code owner November 28, 2019 13:40
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Nov 28, 2019
@ghost ghost requested review from qw4990 and wshwsh12 and removed request for a team November 28, 2019 13:41
@SilvaXiang
Copy link
Contributor Author

/rebuild

@codecov
Copy link

codecov bot commented Nov 29, 2019

Codecov Report

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

@@             Coverage Diff             @@
##             master     #13807   +/-   ##
===========================================
  Coverage          ?   80.1389%           
===========================================
  Files             ?        474           
  Lines             ?     117048           
  Branches          ?          0           
===========================================
  Hits              ?      93801           
  Misses            ?      15844           
  Partials          ?       7403

@SilvaXiang
Copy link
Contributor Author

/rebuild

@sre-bot
Copy link
Contributor

sre-bot commented Jan 4, 2020

@SilvaXiang, please update your pull request.

@francis0407 francis0407 self-requested a review January 7, 2020 07:22
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 added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 9, 2020
@francis0407
Copy link
Member

Hi @SilvaXiang, please run go fmt in expression package.

fix
Copy link
Member

@francis0407 francis0407 left a comment

Choose a reason for hiding this comment

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

Rest LGTM.

expression/builtin_cast_vec.go Outdated Show resolved Hide resolved
@SilvaXiang SilvaXiang requested review from qw4990 and wshwsh12 January 17, 2020 13:00
@wshwsh12 wshwsh12 requested review from francis0407 and removed request for wshwsh12 January 19, 2020 01:24
@@ -51,7 +51,6 @@ var vecBuiltinCastCases = map[string][]vecExprBenchCase{
{retEvalType: types.ETDuration, childrenTypes: []types.EvalType{types.ETInt}, geners: []dataGenerator{new(randDurInt)}},
{retEvalType: types.ETDuration, childrenTypes: []types.EvalType{types.ETReal}, geners: []dataGenerator{new(randDurReal)}},
{retEvalType: types.ETDuration, childrenTypes: []types.EvalType{types.ETDecimal}, geners: []dataGenerator{new(randDurDecimal)}},
{retEvalType: types.ETDuration, childrenTypes: []types.EvalType{types.ETString}, geners: []dataGenerator{new(randDurString)}},
Copy link
Member

Choose a reason for hiding this comment

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

Why remove this? We need this test case actually.

@sre-bot
Copy link
Contributor

sre-bot commented Jan 24, 2020

@SilvaXiang, please update your pull request.

1 similar comment
@sre-bot
Copy link
Contributor

sre-bot commented Jan 31, 2020

@SilvaXiang, please update your pull request.

@qw4990
Copy link
Contributor

qw4990 commented Feb 7, 2020

/run-all-tests

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 merged commit 31a446d into pingcap:master Feb 7, 2020
hsqlu pushed a commit to hsqlu/tidb that referenced this pull request Feb 8, 2020
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/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants