Skip to content

ddl,parser: modify schema to store the partial condition#62759

Merged
ti-chi-bot[bot] merged 1 commit into
pingcap:masterfrom
YangKeao:partial-index-1
Oct 22, 2025
Merged

ddl,parser: modify schema to store the partial condition#62759
ti-chi-bot[bot] merged 1 commit into
pingcap:masterfrom
YangKeao:partial-index-1

Conversation

@YangKeao
Copy link
Copy Markdown
Member

@YangKeao YangKeao commented Aug 1, 2025

What problem does this PR solve?

Issue Number: close #62758

#63448
-> #62759
#62762

What changed and how does it work?

  1. Modify the parser to add support for partial index. The partial index is also part of the IndexOption.
  2. Modify the schema to store the partial condition. The DDL will validate and convert the partial condition to a string and store it in the schema.
  3. Add a new column predicate to the tidb_indexes table to show the index condition.
  4. Modify the ShowExec to show the index condition.

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.

None

@ti-chi-bot ti-chi-bot Bot added release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 1, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 1, 2025

Codecov Report

❌ Patch coverage is 68.47826% with 58 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.4805%. Comparing base (d7470ff) to head (efefc78).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #62759        +/-   ##
================================================
+ Coverage   72.7344%   74.4805%   +1.7461%     
================================================
  Files          1853       1876        +23     
  Lines        500569     508863      +8294     
================================================
+ Hits         364086     379004     +14918     
+ Misses       114348     106262      -8086     
- Partials      22135      23597      +1462     
Flag Coverage Δ
integration 48.3053% <35.8695%> (?)
unit 71.8607% <65.2173%> (-0.4258%) ⬇️

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

Components Coverage Δ
dumpling 52.8700% <ø> (ø)
parser ∅ <ø> (∅)
br 63.1351% <ø> (+16.7236%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@YangKeao YangKeao force-pushed the partial-index-1 branch 2 times, most recently from c6f0f27 to 6600613 Compare August 1, 2025 07:34
@YangKeao YangKeao force-pushed the partial-index-1 branch 7 times, most recently from adb07cc to e892713 Compare August 27, 2025 15:38
@YangKeao
Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@YangKeao
Copy link
Copy Markdown
Member Author

/retest

@YangKeao
Copy link
Copy Markdown
Member Author

YangKeao commented Sep 4, 2025

/retest

@YangKeao
Copy link
Copy Markdown
Member Author

YangKeao commented Sep 5, 2025

/retest

@YangKeao YangKeao force-pushed the partial-index-1 branch 3 times, most recently from 565708f to 872c734 Compare September 10, 2025 10:03
@YangKeao YangKeao changed the title ddl,parser: add parser support for partial index, and modify schema to store the partial condition ddl,parser: modify schema to store the partial condition Sep 10, 2025
@YangKeao YangKeao force-pushed the partial-index-1 branch 2 times, most recently from 6556671 to 020da95 Compare September 12, 2025 07:19
@ti-chi-bot ti-chi-bot Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 12, 2025
@YangKeao YangKeao force-pushed the partial-index-1 branch 2 times, most recently from deff1c4 to fd48f8f Compare October 16, 2025 13:54
@YangKeao
Copy link
Copy Markdown
Member Author

/retest

@YangKeao YangKeao requested a review from wjhuang2016 October 17, 2025 04:50
@ti-chi-bot ti-chi-bot Bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Oct 20, 2025
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Oct 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Oct 21, 2025
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Oct 21, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-10-20 08:38:05.620500847 +0000 UTC m=+688191.697753407: ☑️ agreed by wjhuang2016.
  • 2025-10-21 17:56:50.448543843 +0000 UTC m=+808116.525796402: ☑️ agreed by winoros.

@YangKeao
Copy link
Copy Markdown
Member Author

/retest

2 similar comments
@YangKeao
Copy link
Copy Markdown
Member Author

/retest

@YangKeao
Copy link
Copy Markdown
Member Author

/retest

Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Oct 22, 2025

@YangKeao: 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
non-block/pull-integration-e2e-test-next-gen 6600613 link false /test pull-integration-e2e-test-next-gen
non-block/pull-unit-test-next-gen 6600613 link false /test pull-unit-test-next-gen
non-block/pull-mysql-client-test-next-gen 6600613 link false /test pull-mysql-client-test-next-gen
non-block/pull-mysql-test-next-gen 6600613 link false /test pull-mysql-test-next-gen

Full PR test history. Your PR dashboard.

Details

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.

@YangKeao
Copy link
Copy Markdown
Member Author

/retest

@ti-chi-bot ti-chi-bot Bot merged commit 4865e39 into pingcap:master Oct 22, 2025
32 checks passed
YangKeao added a commit to YangKeao/tidb that referenced this pull request Jan 22, 2026
@ti-chi-bot ti-chi-bot Bot added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Jun 1, 2026
@ti-chi-bot
Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #68831.
But this PR has conflicts, please resolve them!

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.5 Should cherry pick this PR to release-8.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do proper validation and store/load the metadata.

4 participants