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: fix invalid compare-operations in vectorized builtinInDecimalSig #14156

Merged
merged 6 commits into from
Dec 20, 2019

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Dec 20, 2019

What problem does this PR solve?

When comparing two decimals, we should use MyDecimal.Compare instead of using ==.

Check List

Tests

  • Unit test

@qw4990 qw4990 requested a review from a team as a code owner December 20, 2019 07:18
@ghost ghost requested review from wshwsh12 and XuHuaiyu and removed request for a team December 20, 2019 07:18
@qw4990
Copy link
Contributor Author

qw4990 commented Dec 20, 2019

/run-all-tests

@qw4990
Copy link
Contributor Author

qw4990 commented Dec 20, 2019

/run-all-tests

@qw4990 qw4990 requested review from breezewish and lonng December 20, 2019 07:24
@@ -188,7 +188,7 @@ func (b *builtinInDecimalSig) vecEvalInt(input *chunk.Chunk, result *chunk.Colum
arg0 := args0[i]
arg1 := args1[i]
compareResult = 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems we don't need this variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This logic is generated from our template and this variable makes it easier for us to write template code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got

Copy link
Contributor

@lonng lonng left a comment

Choose a reason for hiding this comment

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

LGTM

@breezewish
Copy link
Member

LGTM

@qw4990 qw4990 added status/all tests passed status/LGT2 Indicates that a PR has LGTM 2. labels Dec 20, 2019
@qw4990 qw4990 merged commit 1399e55 into pingcap:master Dec 20, 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 status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants