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: split isTrue and isFalse expression sig (#16542) #16630

Merged
merged 4 commits into from
Apr 24, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Apr 20, 2020

cherry-pick #16542 to release-4.0


What problem does this PR solve?

Close: #15718
Close: #15987
Close: #16501
Close: #16716
Related PR: #12173 #15926 tikv#7532

The reason for the above error is that the variable keepNull in the expression isTrue and isFalse is not pushed down correctly.
After an offline discussion with @XuHuaiyu @SunRunAway @breeswish , we decided to eliminate the keepNull variable by splitting the isTrue and isFalse expression sig to solve this problem.

What is changed and how it works?

Split the isTrue and isFalse expression sig. When the keepNull = true, we set setPbCode = tipb.ScalarFuncSig_XXXIsTrueWithNull. When the keepNull = false, we set setPbCode = tipb.ScalarFuncSig_XXXIsTrue.
So we can don't need to push down the keepNull variable.

Check List

Tests

  • Unit test
  • Integration test

@sre-bot sre-bot requested a review from a team as a code owner April 20, 2020 12:17
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 20, 2020

/run-all-tests

@Reminiscent
Copy link
Contributor

/run-all-tests

@Reminiscent
Copy link
Contributor

wait for tikv#7567

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

@Reminiscent please resolve conflict and fix CI.

@zz-jason zz-jason removed the request for review from XuHuaiyu April 22, 2020 12:38
@Reminiscent
Copy link
Contributor

/run-all-tests

1 similar comment
@Reminiscent
Copy link
Contributor

/run-all-tests

@Reminiscent
Copy link
Contributor

/run-integration-copr-test

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 linked an issue Apr 24, 2020 that may be closed by this pull request
@SunRunAway SunRunAway added the status/can-merge Indicates a PR has been approved by a committer. label Apr 24, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 24, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 24, 2020

@sre-bot merge failed.

@Reminiscent
Copy link
Contributor

@zz-jason Please help me to merge this PR. Thanks!

@breezewish
Copy link
Member

/run-all-tests

@zz-jason zz-jason added the status/LGT2 Indicates that a PR has LGTM 2. label Apr 24, 2020
@zz-jason zz-jason merged commit cded849 into pingcap:release-4.0 Apr 24, 2020
@crazycs520 crazycs520 modified the milestones: v4.0.0-rc.2, v4.0.0-rc.1 Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TiDB expression not correct
6 participants