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 index merge shouldn't push partial limit down when index plans are keep ordered #52979

Merged
merged 3 commits into from May 6, 2024

Conversation

AilinKid
Copy link
Contributor

@AilinKid AilinKid commented Apr 29, 2024

What problem does this PR solve?

Issue Number: close #52947

Problem Summary:
#52947 (comment)

What changed and how does it work?

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.

planner: fix index merge shouldn't push partial limit down when index plans are keep ordered

… keep ordered

Signed-off-by: AilinKid <314806019@qq.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-triage-completed labels Apr 29, 2024
Copy link

tiprow bot commented Apr 29, 2024

Hi @AilinKid. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

.
Signed-off-by: AilinKid <314806019@qq.com>
@AilinKid
Copy link
Contributor Author

/ok-to-test

Copy link

codecov bot commented Apr 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.5078%. Comparing base (26e3b5f) to head (b0d2612).
Report is 15 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #52979        +/-   ##
================================================
+ Coverage   72.3765%   73.5078%   +1.1313%     
================================================
  Files          1482       1499        +17     
  Lines        428762     435329      +6567     
================================================
+ Hits         310323     320001      +9678     
+ Misses        99142      95323      -3819     
- Partials      19297      20005       +708     
Flag Coverage Δ
integration 29.1548% <0.0000%> (?)
unit 71.3097% <100.0000%> (+0.0975%) ⬆️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 44.3022% <ø> (+3.1241%) ⬆️

@AilinKid
Copy link
Contributor Author

/test tidb_parser_test

Copy link

ti-chi-bot bot commented Apr 29, 2024

@AilinKid: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pull-br-integration-test
  • /test pull-integration-ddl-test
  • /test pull-lightning-integration-test
  • /test pull-mysql-client-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test canary-notify-when-compatibility-sections-changed
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-integration-nodejs-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test
  • pingcap/tidb/pull_integration_ddl_test
  • pingcap/tidb/pull_mysql_client_test

In response to this:

/test tidb_parser_test

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 Author

/test fast_test_tiprow

Copy link

ti-chi-bot bot commented Apr 29, 2024

@AilinKid: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pull-br-integration-test
  • /test pull-integration-ddl-test
  • /test pull-lightning-integration-test
  • /test pull-mysql-client-test
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test canary-notify-when-compatibility-sections-changed
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-common-test
  • /test pull-e2e-test
  • /test pull-integration-common-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test pull-integration-nodejs-test
  • /test pull-sqllogic-test
  • /test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test
  • pingcap/tidb/pull_integration_ddl_test
  • pingcap/tidb/pull_mysql_client_test

In response to this:

/test fast_test_tiprow

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 Author

/test all

pkg/planner/core/task.go Outdated Show resolved Hide resolved
@AilinKid
Copy link
Contributor Author

AilinKid commented May 6, 2024

// while for now, we still can not push the sort prop to the intersection index plan side, temporarily banned here.
	if !prop.IsSortItemEmpty() && candidate.path.IndexMergeIsIntersection {
		return invalidTask, nil
	}

intersection case shouldn't pay too much attention of keep-order, because it's already been banned when converting plans

.
Signed-off-by: AilinKid <314806019@qq.com>
Copy link

ti-chi-bot bot commented May 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Defined2014, 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

Copy link

ti-chi-bot bot commented May 6, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-29 09:17:57.669339031 +0000 UTC m=+262431.426474597: ☑️ agreed by Defined2014.
  • 2024-05-06 09:40:55.288450704 +0000 UTC m=+868609.045586277: ☑️ agreed by winoros.

@ti-chi-bot ti-chi-bot bot merged commit 3ca57c1 into pingcap:master May 6, 2024
21 checks passed
3AceShowHand pushed a commit to 3AceShowHand/tidb that referenced this pull request May 7, 2024
@ti-chi-bot
Copy link
Member

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

ti-chi-bot bot pushed a commit that referenced this pull request May 10, 2024
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-8.1 ok-to-test release-note sig/planner SIG: Planner size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
4 participants