Skip to content

Conversation

winoros
Copy link
Member

@winoros winoros commented Mar 5, 2025

What problem does this PR solve?

Issue Number: close #20710

Problem Summary:

What changed and how does it work?

The previous pr only checks that the left keys will be fully covered.
If left keys meet the condition while right keys do not. we can still choose the merge join automatically and put some join key as the other condition.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

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.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 5, 2025
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 ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 5, 2025
Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.3476%. Comparing base (2fd5d1a) to head (7eed650).
Report is 153 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59933        +/-   ##
================================================
+ Coverage   72.9169%   73.3476%   +0.4307%     
================================================
  Files          1701       1701                
  Lines        469725     469767        +42     
================================================
+ Hits         342509     344563      +2054     
+ Misses       106094     104076      -2018     
- Partials      21122      21128         +6     
Flag Coverage Δ
integration 42.7349% <100.0000%> (?)
unit 72.4319% <100.0000%> (+0.0157%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling ∅ <ø> (∅)
parser ∅ <ø> (∅)
br 46.2489% <ø> (+0.0089%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hawkingrei
Copy link
Member

/retest

@hawkingrei hawkingrei force-pushed the disable-merge-join-unless-fullcover branch from ef95293 to 7eed650 Compare March 6, 2025 03:45
@hawkingrei
Copy link
Member

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Mar 6, 2025
@hawkingrei hawkingrei changed the title planner: don't choose merge join unless there's hint or join key fully matched planner: don't choose merge join unless there's hint or join key fully matched | tidb-test=pr/2493 Mar 6, 2025
@hawkingrei
Copy link
Member

/retest

Copy link

ti-chi-bot bot commented Mar 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fixdb, hawkingrei

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 added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 6, 2025
Copy link

ti-chi-bot bot commented Mar 6, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-03-05 22:19:05.316281953 +0000 UTC m=+480058.445201689: ☑️ agreed by fixdb.
  • 2025-03-06 06:03:41.550215488 +0000 UTC m=+507934.679135232: ☑️ agreed by hawkingrei.

@ti-chi-bot ti-chi-bot bot merged commit 163c4be into pingcap:master Mar 6, 2025
24 checks passed
@hawkingrei
Copy link
Member

/cherrypick release-7.5-20250306-v7.5.5-1

@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-7.5-20250306-v7.5.5-1: #59936.
But this PR has conflicts, please resolve them!

In response to this:

/cherrypick release-7.5-20250306-v7.5.5-1

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #59970.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 10, 2025
@winoros winoros added needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Apr 7, 2025
@winoros winoros deleted the disable-merge-join-unless-fullcover branch April 7, 2025 13:25
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #60426.
But this PR has conflicts, please resolve them!

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #60427.
But this PR has conflicts, please resolve them!

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Apr 7, 2025
ti-chi-bot bot pushed a commit that referenced this pull request Apr 8, 2025
zeminzhou pushed a commit to zeminzhou/tidb that referenced this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimizer does not consider the cost of other condition in Index Join
4 participants