Skip to content

executor: Support rank topn#65704

Merged
ti-chi-bot[bot] merged 62 commits into
pingcap:masterfrom
xzhangxian1008:rank-topn
Apr 9, 2026
Merged

executor: Support rank topn#65704
ti-chi-bot[bot] merged 62 commits into
pingcap:masterfrom
xzhangxian1008:rank-topn

Conversation

@xzhangxian1008

@xzhangxian1008 xzhangxian1008 commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #66338

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.

None

Summary by CodeRabbit

  • New Features

    • RankTopN support for partial-order top‑N using prefix-key truncation.
    • Better LIMIT/TopN handling when ordering by a prefix column.
    • Expanded collation API for immutable prefix-key extraction across charsets.
    • New per-column row serialization helper and UTF‑8 substring utility.
  • Bug Fixes

    • Prevented out‑of‑bounds slicing in sort/paging result windows.
  • Tests

    • Comprehensive RankTopN and row‑serialization tests across collations.

@ti-chi-bot ti-chi-bot Bot added do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked 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 Jan 21, 2026
@tiprow

tiprow Bot commented Jan 21, 2026

Copy link
Copy Markdown

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

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.

@xzhangxian1008

Copy link
Copy Markdown
Contributor Author

/retest

@ti-chi-bot ti-chi-bot Bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 8, 2026
@xzhangxian1008

Copy link
Copy Markdown
Contributor 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 Apr 8, 2026
@xzhangxian1008 xzhangxian1008 requested a review from gengliqi April 8, 2026 14:06
@xzhangxian1008

Copy link
Copy Markdown
Contributor Author

/retest

Comment thread tests/integrationtest/t/planner/core/partial_order_topn.test Outdated
xzhangxian1008 and others added 2 commits April 9, 2026 10:54
Co-authored-by: Weizhen Wang <wangweizhen@pingcap.com>

@windtalker windtalker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot

ti-chi-bot Bot commented Apr 9, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, windtalker, wshwsh12, YangKeao

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 the approved label Apr 9, 2026
@xzhangxian1008

Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@xzhangxian1008

Copy link
Copy Markdown
Contributor Author

/retest

@xzhangxian1008

Copy link
Copy Markdown
Contributor Author

/retest

@ti-chi-bot

ti-chi-bot Bot commented Apr 9, 2026

Copy link
Copy Markdown

@xzhangxian1008: 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
pull-integration-ddl-test 9dba118 link true /test pull-integration-ddl-test

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.

@xzhangxian1008

Copy link
Copy Markdown
Contributor Author

/retest

@ti-chi-bot ti-chi-bot Bot merged commit e8ae09d into pingcap:master Apr 9, 2026
35 checks passed
@xzhangxian1008 xzhangxian1008 deleted the rank-topn branch April 9, 2026 14:10
premal pushed a commit to premal/tidb that referenced this pull request Apr 30, 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 5, 2026
@ti-chi-bot

Copy link
Copy Markdown
Member

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

ti-chi-bot Bot pushed a commit that referenced this pull request Jun 9, 2026
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. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner 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.

Support rank topn

8 participants