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 idxMergePartPlans forget to deal with RootTaskConds #58507

Merged
merged 15 commits into from
Dec 24, 2024

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Dec 24, 2024

What problem does this PR solve?

Issue Number: close #58476

Problem Summary:

What changed and how does it work?

fix idxMergePartPlans forget to deal with RootTaskConds

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.

fix idxMergePartPlans forget to deal with RootTaskConds

修复在处理 idxMergePartPlans 时忘记处理 RootTaskConds 的问题

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/needs-triage-completed sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Dec 24, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 24, 2024
tk.MustExec("CREATE TABLE t3 (id int PRIMARY KEY,c1 varchar(256),c2 varchar(256) GENERATED ALWAYS AS (concat(c1, c1)) VIRTUAL,KEY (id));")
tk.MustExec("insert into t3(id, c1) values (50, 'c');")
tk.MustQuery("SELECT /*+ USE_INDEX_MERGE(`t3`)*/ id FROM `t3` WHERE c2 BETWEEN 'a' AND 'b' GROUP BY id HAVING id < 100 or id > 0;").Check(testkit.Rows())
tk.MustQuery("EXPLAIN SELECT /*+ USE_INDEX_MERGE(`t3`)*/ id FROM `t3` WHERE c2 BETWEEN 'a' AND 'b' GROUP BY id HAVING id < 100 or id > 0;").
Copy link
Contributor

Choose a reason for hiding this comment

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

Better to use "explain format='brief'"

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, it has been updated.

Copy link

codecov bot commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.3941%. Comparing base (042a332) to head (1624360).
Report is 13 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #58507        +/-   ##
================================================
- Coverage   73.5257%   73.3941%   -0.1317%     
================================================
  Files          1681       1681                
  Lines        464104     467792      +3688     
================================================
+ Hits         341236     343332      +2096     
- Misses       102047     103581      +1534     
- Partials      20821      20879        +58     
Flag Coverage Δ
integration 43.1817% <100.0000%> (?)
unit 72.2751% <100.0000%> (-0.0136%) ⬇️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.1616% <ø> (-0.6140%) ⬇️

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 24, 2024
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
@ti-chi-bot ti-chi-bot bot removed the approved label Dec 24, 2024
Signed-off-by: Weizhen Wang <[email protected]>
@ti-chi-bot ti-chi-bot bot added the approved label Dec 24, 2024
Signed-off-by: Weizhen Wang <[email protected]>
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 24, 2024
Copy link

ti-chi-bot bot commented Dec 24, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-24 09:40:59.430032696 +0000 UTC m=+1554649.518835224: ☑️ agreed by qw4990.
  • 2024-12-24 13:02:13.19450113 +0000 UTC m=+1566723.283303673: ☑️ agreed by winoros.

@hawkingrei
Copy link
Member Author

/hold

self-check

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 24, 2024
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Copy link

ti-chi-bot bot commented Dec 24, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qw4990, winoros

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 removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 24, 2024
Signed-off-by: Weizhen Wang <[email protected]>
@ti-chi-bot ti-chi-bot bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 24, 2024
Signed-off-by: Weizhen Wang <[email protected]>
@hawkingrei
Copy link
Member Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 24, 2024
@ti-chi-bot ti-chi-bot bot merged commit 0c22a2d into pingcap:master Dec 24, 2024
24 checks passed
@hawkingrei hawkingrei deleted the 58476 branch December 25, 2024 02:04
@hawkingrei
Copy link
Member Author

/cherrypick release-8.5
/cherrypick release-8.1
/cherrypick release-7.5
/cherrypick release-7.1

@hawkingrei
Copy link
Member Author

/cherrypick release-6.5

@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-7.1: #58516.

In response to this:

/cherrypick release-8.5
/cherrypick release-8.1
/cherrypick release-7.5
/cherrypick release-7.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 pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 25, 2024
@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-6.5: #58517.

In response to this:

/cherrypick release-6.5

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 pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 25, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 25, 2024
@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-7.5: #58518.

In response to this:

/cherrypick release-8.5
/cherrypick release-8.1
/cherrypick release-7.5
/cherrypick release-7.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

@hawkingrei: new pull request created to branch release-8.1: #58519.

In response to this:

/cherrypick release-8.5
/cherrypick release-8.1
/cherrypick release-7.5
/cherrypick release-7.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 pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 25, 2024
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Dec 25, 2024
@ti-chi-bot
Copy link
Member

@hawkingrei: new pull request created to branch release-8.5: #58520.

In response to this:

/cherrypick release-8.5
/cherrypick release-8.1
/cherrypick release-7.5
/cherrypick release-7.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.

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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Index merge wrongly ignore some predicates of generated column
4 participants