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: let `PushDownNot` does not change the argument #10363

Merged
merged 3 commits into from May 6, 2019

Conversation

Projects
None yet
3 participants
@lamxTyler
Copy link
Member

commented May 6, 2019

What problem does this PR solve?

Fix #10344

What is changed and how it works?

PushDownNot directly change its argument expr, and if the expr is referenced in other places, it will cause wrong results. This PR keeps the argument unchanged.

Check List

Tests

  • Unit test
  • Integration test

Code changes

  • Has exported function/method change

Side effects

  • None

Related changes

  • Need to cherry-pick to the release branch
@lamxTyler

This comment has been minimized.

Copy link
Member Author

commented May 6, 2019

/run-all-tests

@winoros
Copy link
Member

left a comment

lgtm

@@ -395,7 +395,7 @@ func (s *testPlanSuite) TestSimplifyOuterJoin(c *C) {
},
{
sql: "select * from t t1 left join t t2 on t1.b = t2.b where not (t1.c > 1 and t2.c > 1);",
best: "Join{DataScan(t1)->DataScan(t2)}(test.t1.b,test.t2.b)->Sel([not(and(le(test.t1.c, 1), le(test.t2.c, 1)))])->Projection",

This comment has been minimized.

Copy link
@winoros

winoros May 6, 2019

Member

So this one is wrong previously? 😂

This comment has been minimized.

Copy link
@lamxTyler

lamxTyler May 6, 2019

Author Member

Yes...

@codecov

This comment has been minimized.

Copy link

commented May 6, 2019

Codecov Report

Merging #10363 into master will increase coverage by 0.0169%.
The diff coverage is 100%.

@@               Coverage Diff                @@
##             master     #10363        +/-   ##
================================================
+ Coverage   77.6648%   77.6818%   +0.0169%     
================================================
  Files           411        411                
  Lines         85475      85437        -38     
================================================
- Hits          66384      66369        -15     
+ Misses        14128      14114        -14     
+ Partials       4963       4954         -9
Show resolved Hide resolved expression/util.go Outdated
@XuHuaiyu
Copy link
Contributor

left a comment

LGTM

@XuHuaiyu XuHuaiyu added status/LGT2 and removed status/LGT1 labels May 6, 2019

@lamxTyler lamxTyler merged commit 0106361 into pingcap:master May 6, 2019

8 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 0%)
Details
codecov/project 77.6818% (+0.0169%) compared to 7e80053
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/build_check_race Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev_2 Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@lamxTyler lamxTyler deleted the lamxTyler:pushNot branch May 6, 2019

benpigchu added a commit to benpigchu/tidb that referenced this pull request May 7, 2019

lamxTyler added a commit to lamxTyler/tidb that referenced this pull request May 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.