planner: support left outer join into anti semi join | tidb-test=pr/2649#64959
planner: support left outer join into anti semi join | tidb-test=pr/2649#64959ti-chi-bot[bot] merged 73 commits intopingcap:masterfrom
Conversation
|
/retest |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #64959 +/- ##
================================================
+ Coverage 77.8439% 78.9126% +1.0686%
================================================
Files 1983 1912 -71
Lines 542787 527358 -15429
================================================
- Hits 422527 416152 -6375
+ Misses 118601 110316 -8285
+ Partials 1659 890 -769
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/retest |
|
/retest |
ae46b9c to
fc4d779
Compare
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
/retest |
4 similar comments
|
/retest |
|
/retest |
|
/retest |
|
/retest |
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/retest |
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AilinKid, guo-shaoge, winoros The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
/unhold |
|
/hold |
|
/unhold |
|
/retest |
5 similar comments
|
/retest |
|
/retest |
|
/retest |
|
/retest |
|
/retest |
What problem does this PR solve?
Issue Number: close #64329
Problem Summary: planner: support left outer join into anti semi join
What changed and how does it work?
This PR introduces two optimization patterns for transforming LEFT JOIN queries into NOT EXISTS subqueries when checking for missing matches.
Scenario 1: IS NULL on the Join Condition Column
Table Schema
Plan
=>
Scenario 2: IS NULL on a Non-Join NOT NULL Column
If a column in the inner table is defined as
NOT NULLin the schema, but is filtered asIS NULLafter the join, it implies that the join failed to find a match. This allows us to convert the join intoANTI SEMI JOINeven if the column is not part of the join keys. (just guarantee that the condition only filter those null rows only generated from null supplied side)Table Schema:
Plan
=>
Check List
Tests
https://github.com/PingCAP-QE/planreplayertest/pull/31
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.