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: derive index filters for mv index paths #54877

Merged
merged 4 commits into from
Jul 26, 2024

Conversation

time-and-fate
Copy link
Member

@time-and-fate time-and-fate commented Jul 24, 2024

What problem does this PR solve?

Issue Number: close #54876

Problem Summary:

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.

支持在多值索引的 `IndexRangeScan` 上生成 `Selection`。
Support deriving filters in `Selection` above `IndexRangeScan` for multi-valued index.

@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/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 24, 2024
@time-and-fate
Copy link
Member Author

/retest

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.7540%. Comparing base (8f98b4e) to head (053f681).
Report is 27 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #54877        +/-   ##
================================================
+ Coverage   72.9336%   74.7540%   +1.8204%     
================================================
  Files          1558       1564         +6     
  Lines        438456     447217      +8761     
================================================
+ Hits         319782     334313     +14531     
+ Misses        99064      92605      -6459     
- Partials      19610      20299       +689     
Flag Coverage Δ
integration 49.9976% <100.0000%> (?)
unit 71.6430% <91.8918%> (-0.3075%) ⬇️

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

Components Coverage Δ
dumpling 52.9567% <ø> (-0.0089%) ⬇️
parser ∅ <ø> (∅)
br 51.6635% <ø> (+5.7847%) ⬆️

@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. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jul 24, 2024
@time-and-fate
Copy link
Member Author

/retest

@@ -1081,3 +1081,127 @@ IndexMerge 0.05 root type: union
└─Selection(Probe) 0.05 cop[tikv] eq(planner__core__indexmerge_path.t.a, 1)
└─TableRowIDScan 49.94 cop[tikv] table:t keep order:false, stats:pseudo
SET @@tidb_opt_fix_control = default;
drop table if exists t, t1;
Copy link
Contributor

@AilinKid AilinKid Jul 26, 2024

Choose a reason for hiding this comment

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

the logic code change makes sense to me, by the way, is there any test case that needs to be modified?

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 26, 2024
Copy link

ti-chi-bot bot commented Jul 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, 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 added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 26, 2024
Copy link

ti-chi-bot bot commented Jul 26, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-26 05:51:29.085614694 +0000 UTC m=+1197111.076556157: ☑️ agreed by AilinKid.
  • 2024-07-26 16:48:41.450240159 +0000 UTC m=+24405.577300308: ☑️ agreed by winoros.

@ti-chi-bot ti-chi-bot bot merged commit 56710ae into pingcap:master Jul 26, 2024
23 checks passed
morgo added a commit to morgo/tidb that referenced this pull request Jul 28, 2024
* upstream/master: (93 commits)
  disjoinset: add generic impl (pingcap#54917)
  planner: derive index filters for mv index paths (pingcap#54877)
  br: cli refactor backup error handling logic (pingcap#54697)
  expression: fix infinity loop in `timestampadd` (pingcap#54916)
  planner: import more expand test. (pingcap#54962)
  planner: use code-gen to generate CloneForPlanCache method for some operators (pingcap#54957)
  test: fix flaky test TestFailSchemaSyncer (pingcap#54958)
  planner: move logical show into logicalop pkg. (pingcap#54928)
  privilege: Remove TestAbnormalMySQLTable (pingcap#54925)
  resource_control: support unlimited keyword when setting the resource group (pingcap#54704)
  ddl: fix a data race on localRowCntListener Written() (pingcap#54484)
  lightning: fix SET SESSION on connection pool (pingcap#54927)
  planner: move logical mem-table to logicalop pkg. (pingcap#54903)
  table: Add `CachedTableSupport` and `TemporaryTableSupport` for `MutateContext` (pingcap#54900)
  executor: fix index_hash_join hang when context canceled (pingcap#54855)
  statistics: add metrics for unneeded analyze table (pingcap#54822)
  *: refine pipelined dml benchmarks (pingcap#54844)
  ddl: assign table IDs for jobs submitted to queue (pingcap#54880)
  *: avoid using Tables field of model.DBInfo, use API instead (pingcap#52302)
  planner: remove useless check (pingcap#54907)
  ...
@time-and-fate
Copy link
Member Author

/cherry-pick release-8.1

@ti-chi-bot
Copy link
Member

@time-and-fate: new pull request created to branch release-8.1: #55027.

In response to this:

/cherry-pick release-8.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/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.

derive index filters for mv index paths
4 participants