tidb icon indicating copy to clipboard operation
tidb copied to clipboard

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

Open AilinKid opened this issue 9 months ago • 11 comments

What problem does this PR solve?

Issue Number: close https://github.com/pingcap/tidb/issues/52947

Problem Summary: https://github.com/pingcap/tidb/issues/52947#issuecomment-2082033877

What changed and how does it work?

Check List

Tests

  • [x] 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

AilinKid avatar Apr 29 '24 08:04 AilinKid

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.

tiprow[bot] avatar Apr 29 '24 09:04 tiprow[bot]

/ok-to-test

AilinKid avatar Apr 29 '24 09:04 AilinKid

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Defined2014 Once this PR has been reviewed and has the lgtm label, please ask for approval from ailinkid, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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[bot] avatar Apr 29 '24 09:04 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

  • 2024-04-29 09:17:57.669339031 +0000 UTC m=+262431.426474597: :ballot_box_with_check: agreed by Defined2014.

ti-chi-bot[bot] avatar Apr 29 '24 09:04 ti-chi-bot[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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%) :arrow_up:

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%) :arrow_up:

codecov[bot] avatar Apr 29 '24 09:04 codecov[bot]

/test tidb_parser_test

AilinKid avatar Apr 29 '24 09:04 AilinKid

@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.

ti-chi-bot[bot] avatar Apr 29 '24 09:04 ti-chi-bot[bot]

/test fast_test_tiprow

AilinKid avatar Apr 29 '24 09:04 AilinKid

@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.

ti-chi-bot[bot] avatar Apr 29 '24 09:04 ti-chi-bot[bot]

/test all

AilinKid avatar Apr 29 '24 09:04 AilinKid

@AilinKid: 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
idc-jenkins-ci-tidb/check_dev_2 4cfe1639e0b5e848626100bcf82a63c312baf989 link true /test check-dev2

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.

ti-chi-bot[bot] avatar Apr 29 '24 10:04 ti-chi-bot[bot]

// 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

AilinKid avatar May 06 '24 08:05 AilinKid

[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

ti-chi-bot[bot] avatar May 06 '24 09:05 ti-chi-bot[bot]

[LGTM Timeline notifier]

Timeline:

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

ti-chi-bot[bot] avatar May 06 '24 09:05 ti-chi-bot[bot]

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

ti-chi-bot avatar May 10 '24 02:05 ti-chi-bot

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

ti-chi-bot avatar May 21 '24 00:05 ti-chi-bot