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, sctx: open enhanced index join pattern by default | tidb-test=pr/2395 #56172

Merged
merged 8 commits into from
Sep 24, 2024

Conversation

winoros
Copy link
Member

@winoros winoros commented Sep 19, 2024

What problem does this PR solve?

Issue Number: ref #47233

Problem Summary:

What changed and how does it work?

Open the var tidb_enable_inl_join_inner_multi_pattern by default.

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.

默认开启 tidb_enable_inl_join_inner_multi_pattern,扩展 TiDB Index Join 的能力
open the variable `tidb_enable_inl_join_inner_multi_pattern` by default, enhancing the power of TiDB's index join.

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 19, 2024
@winoros
Copy link
Member Author

winoros commented Sep 19, 2024

The extra changes in https://github.com/pingcap/tidb/pull/56172/files#diff-e82acde450b380d2b2347aeb83d34bffaaa10b19d9eb24ea7aadbef96d71c875 is to solve the following issue:

  • When there are virtual columns, there'll be projection.
    image
  • But union scan cannot support projection as its inner child
    image
  • UnionScan's Attach2Task deals with this case.
    image

So I changed the code to solve this issue. The affected test is TestIssue53951 when it chooses g2 as the index join's inner child.

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 73.91304% with 6 lines in your changes missing coverage. Please review.

Project coverage is 75.9931%. Comparing base (05cff08) to head (c1a1488).
Report is 246 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #56172        +/-   ##
================================================
+ Coverage   73.3233%   75.9931%   +2.6698%     
================================================
  Files          1604       1656        +52     
  Lines        444617     455783     +11166     
================================================
+ Hits         326008     346364     +20356     
+ Misses        98674      87959     -10715     
- Partials      19935      21460      +1525     
Flag Coverage Δ
integration 52.0440% <65.2173%> (?)
unit 72.6466% <73.9130%> (+0.1299%) ⬆️

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

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 63.0384% <ø> (+17.7615%) ⬆️

@winoros winoros changed the title planner, sctx: open enhanced index join pattern by default planner, sctx: open enhanced index join pattern by default | tidb-test=pr/2395 Sep 19, 2024
@winoros
Copy link
Member Author

winoros commented Sep 19, 2024

/retest

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 20, 2024
Copy link
Contributor

@elsa0520 elsa0520 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Sep 20, 2024
Copy link

ti-chi-bot bot commented Sep 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-09-20 02:46:06.601823909 +0000 UTC m=+1188436.342247847: ☑️ agreed by hawkingrei.
  • 2024-09-20 02:58:18.030409473 +0000 UTC m=+1189167.770833412: ☑️ agreed by elsa0520.

@AilinKid
Copy link
Contributor

@zimulala ptal

Copy link

@yudongusa yudongusa left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

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

lgtm for infoschema

@ti-chi-bot ti-chi-bot bot added the approved label Sep 24, 2024
Copy link

ti-chi-bot bot commented Sep 24, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, elsa0520, hawkingrei, Leavrth, tangenta, yudongusa, zimulala

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

Copy link

tiprow bot commented Sep 24, 2024

@winoros: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
fast_test_tiprow c1a1488 link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

Copy link

ti-chi-bot bot commented Sep 24, 2024

@winoros: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/check_dev_2 c1a1488 link unknown /test check-dev2
pull-br-integration-test c1a1488 link unknown /test pull-br-integration-test

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@winoros
Copy link
Member Author

winoros commented Sep 24, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit 53a3d20 into pingcap:master Sep 24, 2024
22 of 25 checks passed
@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label Oct 28, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Oct 28, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #56882.

@ti-chi-bot ti-chi-bot bot removed the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/planner SIG: Planner size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants