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

planner: fix join reorder will append remained other condition to an outer join (#44409) #44423

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #44409

What problem does this PR solve?

Issue Number: close #44314

Problem Summary:

What is changed and how it works?

As mentioned in the last comment on the issue

Reason: outer join's other condition influence is quite different from inner join's other condition, the latter one functions as a simple filter, just integrated with inner join. The former functions as a simple filter but also decides whether the outer join is matched or not, consequently deciding whether appending an additional null (which means this row itself is not pruned in the final result)

So when enumerating join order when encountering inner join combined with outer join, those original other conditions bonded with an outer join, just let it be; those additional remained other conditions shouldn't be put down into it, adding additional selection above is a resolution.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

planner: fix join reorder will append remained condition to an outer join

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: AilinKid <314806019@qq.com>
@AilinKid
Copy link
Contributor

AilinKid commented Jun 6, 2023

/LGTM

@elsa0520
Copy link
Contributor

elsa0520 commented Jun 6, 2023

/lgtm

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 6, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-06-06 03:54:56.116506164 +0000 UTC m=+320482.389478933: ☑️ agreed by AilinKid.
  • 2023-06-06 03:56:35.59660034 +0000 UTC m=+320581.869573123: ☑️ agreed by chrysan.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 6, 2023

@elsa0520: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@AilinKid
Copy link
Contributor

AilinKid commented Jun 6, 2023

/merge

Copy link
Contributor

@fixdb fixdb left a comment

Choose a reason for hiding this comment

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

+1

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 6, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, chrysan, elsa0520, fixdb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot merged commit 585a3a6 into pingcap:release-6.5 Jun 6, 2023
7 of 8 checks passed
@ti-chi-bot ti-chi-bot removed the cherry-pick-approved Cherry pick PR approved by release team. label Jun 14, 2023
@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-6.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants