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

plan/executor: make semi joins null and empty aware #9051

Merged
merged 2 commits into from Feb 25, 2019

Conversation

@eurekaka
Copy link
Contributor

commented Jan 14, 2019

What problem does this PR solve?

Fix #8844 and #8642

What is changed and how it works?

  • mark column as operand of in expression, to differentiate column equal condition converted from in expression with other normal column equal conditions;
  • put in expression into OtherConditions of join to make join operators be empty aware;
  • check if null exists in operands of in expression, and determine result of semi joins.

Check List

Tests

  • Unit test
  • Integration test

Code changes

  • Has exported function/method change
  • Has interface methods change

Side effects

  • Increased code complexity

Related changes

  • Need to cherry-pick to the release branch: let's see if it is easy to cherry-pick and decide later.
@eurekaka eurekaka force-pushed the eurekaka:in_other_cond branch 2 times, most recently from 7bfa1e0 to 736bd63 Jan 15, 2019
@eurekaka

This comment has been minimized.

Copy link
Contributor Author

commented Jan 15, 2019

/run-all-tests tidb-test=pr/702

@eurekaka eurekaka changed the title plan/executor: null and empty aware semi joins plan/executor: make semi joins null and empty aware Jan 15, 2019
@eurekaka

This comment has been minimized.

Copy link
Contributor Author

commented Jan 15, 2019

/run-all-tests tidb-test=pr/702

@codecov-io

This comment has been minimized.

Copy link

commented Jan 15, 2019

Codecov Report

Merging #9051 into master will increase coverage by 0.02%.
The diff coverage is 71.15%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #9051      +/-   ##
=========================================
+ Coverage   67.17%   67.2%   +0.02%     
=========================================
  Files         373     373              
  Lines       78386   78450      +64     
=========================================
+ Hits        52658   52724      +66     
- Misses      21007   21008       +1     
+ Partials     4721    4718       -3
Impacted Files Coverage Δ
expression/column.go 77.4% <ø> (ø) ⬆️
executor/executor.go 67.89% <0%> (ø) ⬆️
planner/core/rule_partition_processor.go 74.02% <100%> (ø) ⬆️
planner/core/rule_predicate_push_down.go 89.84% <100%> (+0.68%) ⬆️
planner/core/find_best_task.go 87.9% <100%> (ø) ⬆️
executor/union_scan.go 78.73% <100%> (ø) ⬆️
expression/chunk_executor.go 79.26% <100%> (ø) ⬆️
planner/core/logical_plan_builder.go 74.14% <100%> (ø) ⬆️
executor/merge_join.go 80.85% <100%> (+1.39%) ⬆️
planner/core/rule_eliminate_projection.go 95.83% <100%> (ø) ⬆️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f105b71...49fb0e0. Read the comment docs.

@eurekaka eurekaka requested review from zz-jason, lamxTyler, winoros and XuHuaiyu Jan 15, 2019
cmd/explaintest/r/explain_easy.result Show resolved Hide resolved
planner/core/rule_predicate_push_down.go Outdated Show resolved Hide resolved
planner/core/logical_plan_builder.go Outdated Show resolved Hide resolved
planner/core/rule_predicate_push_down.go Outdated Show resolved Hide resolved
expression/expression.go Outdated Show resolved Hide resolved
@eurekaka eurekaka requested a review from winoros Jan 18, 2019
expression/expression.go Outdated Show resolved Hide resolved
executor/joiner.go Outdated Show resolved Hide resolved
@eurekaka eurekaka requested a review from lamxTyler Jan 24, 2019
@eurekaka eurekaka force-pushed the eurekaka:in_other_cond branch 6 times, most recently from 735398d to e7aba08 Jan 30, 2019
@eurekaka

This comment has been minimized.

Copy link
Contributor Author

commented Jan 31, 2019

/run-all-tests tidb-test=pr/702

1 similar comment
@eurekaka

This comment has been minimized.

Copy link
Contributor Author

commented Jan 31, 2019

/run-all-tests tidb-test=pr/702

@eurekaka eurekaka requested a review from zz-jason Jan 31, 2019
Copy link
Member

left a comment

rest lgtm

planner/core/expression_rewriter.go Outdated Show resolved Hide resolved
executor/join.go Show resolved Hide resolved
executor/joiner.go Show resolved Hide resolved
executor/joiner.go Show resolved Hide resolved
planner/core/expression_rewriter.go Show resolved Hide resolved
planner/core/expression_rewriter.go Outdated Show resolved Hide resolved
@eurekaka eurekaka force-pushed the eurekaka:in_other_cond branch from 870aa60 to d438365 Feb 22, 2019
@eurekaka eurekaka requested review from zz-jason and winoros and removed request for zz-jason Feb 22, 2019
Copy link
Member

left a comment

LGTM

@eurekaka

This comment has been minimized.

Copy link
Contributor Author

commented Feb 22, 2019

@winoros PTAL

Copy link
Member

left a comment

LGTM

@zz-jason zz-jason merged commit 5a283a9 into pingcap:master Feb 25, 2019
5 checks passed
5 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
@zz-jason zz-jason added status/LGT2 and removed status/LGT1 labels Feb 25, 2019
@eurekaka eurekaka deleted the eurekaka:in_other_cond branch Feb 25, 2019
eurekaka added a commit to eurekaka/tidb that referenced this pull request Feb 25, 2019
zz-jason added a commit that referenced this pull request Feb 25, 2019
yu34po added a commit to yu34po/tidb that referenced this pull request Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.