-
Notifications
You must be signed in to change notification settings - Fork 6.2k
planner: support pushing Limit and TopN to individual partial paths of IndexMerge (#68772) #68858
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
base: release-8.5
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1179,7 +1179,8 @@ | |
| "TopN 1.00 root test.t.c, offset:0, count:1", | ||
| "└─IndexMerge 1.00 root type: union", | ||
| " ├─IndexRangeScan(Build) 510.00 cop[tikv] table:t, index:ib(b) range:[0,50], keep order:false, stats:pseudo", | ||
| " ├─IndexRangeScan(Build) 510.00 cop[tikv] table:t, index:ic(c) range:[0,50], keep order:false, stats:pseudo", | ||
| " ├─Limit(Build) 1.00 cop[tikv] offset:0, count:1", | ||
| " │ └─IndexRangeScan 510.00 cop[tikv] table:t, index:ic(c) range:[0,50], keep order:true, stats:pseudo", | ||
| " └─TopN(Probe) 1.00 cop[tikv] test.t.c, offset:0, count:1", | ||
| " └─TableRowIDScan 1017.40 cop[tikv] table:t keep order:false, stats:pseudo" | ||
|
Comment on lines
1179
to
1185
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This expectation still misses the unordered partial-path For the mixed-match IndexMerge case, the new behavior is supposed to push 🤖 Prompt for AI Agents |
||
| ] | ||
|
|
||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,18 +67,30 @@ | |
| "SQL": "explain format = 'verbose' select * from t3 order by a limit 1", | ||
| "Plan": [ | ||
| "TopN_7 1.00 60.74 root test.t3.a, offset:0, count:1", | ||
| <<<<<<< HEAD | ||
| "└─TableReader_15 1.00 54.34 root data:TopN_14", | ||
| " └─TopN_14 1.00 688.32 cop[tikv] test.t3.a, offset:0, count:1", | ||
| " └─TableFullScan_13 3.00 681.92 cop[tikv] table:t3 keep order:false" | ||
| ======= | ||
| "└─TableReader_17 1.00 54.34 root data:TopN_16", | ||
| " └─TopN_16 1.00 688.32 cop[tikv] test.t3.a, offset:0, count:1", | ||
| " └─TableFullScan_15 3.00 681.92 cop[tikv] table:t3 keep order:false" | ||
| >>>>>>> 2310c3d99f3 (planner: support pushing Limit and TopN to individual partial paths of IndexMerge (#68772)) | ||
|
Comment on lines
+70
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolve the leftover merge conflict markers. These As per coding guidelines, "Testdata: Keep test changes minimal and deterministic; avoid broad golden/testdata churn unless required; follow test naming and shard_count guidance". Also applies to: 85-93 🧰 Tools🪛 Biome (2.4.16)[error] 70-70: unexpected character (parse) [error] 70-70: unexpected character (parse) [error] 70-70: unexpected character (parse) [error] 70-70: unexpected character (parse) [error] 70-70: unexpected character (parse) [error] 70-70: unexpected character (parse) [error] 70-70: unexpected character (parse) [error] 70-70: expected (parse) [error] 71-71: expected (parse) [error] 74-74: unexpected character (parse) [error] 74-74: unexpected character (parse) [error] 74-74: unexpected character (parse) [error] 74-74: unexpected character (parse) [error] 74-74: unexpected character (parse) [error] 74-74: unexpected character (parse) [error] 74-74: unexpected character (parse) [error] 75-75: expected (parse) [error] 78-78: unexpected character (parse) [error] 78-78: unexpected character (parse) [error] 78-78: unexpected character (parse) [error] 78-78: unexpected character (parse) [error] 78-78: unexpected character (parse) [error] 78-78: unexpected character (parse) [error] 78-78: unexpected character (parse) [error] 78-78: expected (parse) [error] 78-78: expected (parse) [error] 78-78: unexpected character (parse) [error] 78-78: expected (parse) [error] 78-78: expected (parse) [error] 78-78: unexpected character (parse) [error] 78-78: unexpected character (parse) [error] 78-78: expected (parse) [error] 78-78: unexpected character (parse) [error] 78-78: unexpected character (parse) 🤖 Prompt for AI Agents |
||
| ] | ||
| }, | ||
| { | ||
| "SQL": "explain format = 'verbose' select * from t3 order by b limit 1", | ||
| "Plan": [ | ||
| "TopN_7 1.00 60.74 root test.t3.b, offset:0, count:1", | ||
| <<<<<<< HEAD | ||
| "└─TableReader_15 1.00 54.34 root data:TopN_14", | ||
| " └─TopN_14 1.00 688.32 cop[tikv] test.t3.b, offset:0, count:1", | ||
| " └─TableFullScan_13 3.00 681.92 cop[tikv] table:t3 keep order:false" | ||
| ======= | ||
| "└─TableReader_17 1.00 54.34 root data:TopN_16", | ||
| " └─TopN_16 1.00 688.32 cop[tikv] test.t3.b, offset:0, count:1", | ||
| " └─TableFullScan_15 3.00 681.92 cop[tikv] table:t3 keep order:false" | ||
| >>>>>>> 2310c3d99f3 (planner: support pushing Limit and TopN to individual partial paths of IndexMerge (#68772)) | ||
| ] | ||
| }, | ||
| { | ||
|
|
||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve the leftover cherry-pick conflict markers.
These
<<<<<<</=======/>>>>>>>markers make the fixture invalid JSON, so the prepare-suite testdata cannot even be parsed. Pick the intended plan variant and remove the conflict artifact before merge.Also applies to: 1233-1241
🧰 Tools
🪛 Biome (2.4.16)
[error] 1211-1211: unexpected character
<(parse)
[error] 1211-1211: unexpected character
<(parse)
[error] 1211-1211: unexpected character
<(parse)
[error] 1211-1211: unexpected character
<(parse)
[error] 1211-1211: unexpected character
<(parse)
[error] 1211-1211: unexpected character
<(parse)
[error] 1211-1211: unexpected character
<(parse)
[error] 1211-1211: expected
,but instead foundHEAD(parse)
[error] 1212-1212: expected
,but instead found"└─TableReader_14 1.00 root data:TopN_13"(parse)
[error] 1215-1215: unexpected character
=(parse)
[error] 1215-1215: unexpected character
=(parse)
[error] 1215-1215: unexpected character
=(parse)
[error] 1215-1215: unexpected character
=(parse)
[error] 1215-1215: unexpected character
=(parse)
[error] 1215-1215: unexpected character
=(parse)
[error] 1215-1215: unexpected character
=(parse)
[error] 1216-1216: expected
,but instead found"└─TableReader_17 1.00 root data:TopN_16"(parse)
[error] 1219-1219: unexpected character
>(parse)
[error] 1219-1219: unexpected character
>(parse)
[error] 1219-1219: unexpected character
>(parse)
[error] 1219-1219: unexpected character
>(parse)
[error] 1219-1219: unexpected character
>(parse)
[error] 1219-1219: unexpected character
>(parse)
[error] 1219-1219: unexpected character
>(parse)
[error] 1219-1219: expected
,but instead found2310(parse)
[error] 1219-1219: expected
,but instead foundc3d99f3(parse)
[error] 1219-1219: unexpected character
((parse)
[error] 1219-1219: expected
,but instead foundplanner(parse)
[error] 1219-1219: expected
,but instead found:(parse)
[error] 1219-1219: unexpected character
((parse)
[error] 1219-1219: unexpected character
#(parse)
[error] 1219-1219: expected
,but instead found68772(parse)
[error] 1219-1219: unexpected character
)(parse)
[error] 1219-1219: unexpected character
)(parse)
🤖 Prompt for AI Agents