-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: update some UTs to use cost model2 #38875
Merged
Merged
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d048aad
fixup
qw4990 885552d
fixup
qw4990 28ab270
fixup
qw4990 5362285
fixup
qw4990 26c12c2
Merge branch 'master' into model2-test
qw4990 d443761
fixup
qw4990 69fec6f
fixup
qw4990 f98bd77
Merge branch 'master' into model2-test
qw4990 b3bde8a
Merge branch 'master' into model2-test
qw4990 4a09ea0
Merge branch 'master' into model2-test
qw4990 735549b
Merge branch 'master' into model2-test
qw4990 0414a3b
Merge branch 'master' into model2-test
qw4990 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,13 +160,13 @@ | |
], | ||
"Plan": [ | ||
"Limit 1.00 root offset:0, count:1", | ||
"└─IndexJoin 1.00 root left outer semi join, inner:IndexReader, outer key:test.t.a, inner key:test.t.b, equal cond:eq(test.t.a, test.t.b)", | ||
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. Expected since cost of IndexJoin is under-estimated in model1. |
||
" ├─TopN(Build) 1.00 root test.t.a, offset:0, count:1", | ||
" │ └─IndexReader 1.00 root index:TopN", | ||
" │ └─TopN 1.00 cop[tikv] test.t.a, offset:0, count:1", | ||
" │ └─IndexRangeScan 6.00 cop[tikv] table:t1, index:idx_bc(b, c) range:[-inf,6], keep order:false", | ||
" └─IndexReader(Probe) 1.04 root index:IndexRangeScan", | ||
" └─IndexRangeScan 1.04 cop[tikv] table:t2, index:idx_bc(b, c) range: decided by [eq(test.t.b, test.t.a)], keep order:false" | ||
"└─MergeJoin 1.00 root left outer semi join, left key:test.t.a, right key:test.t.b", | ||
" ├─IndexReader(Build) 25.00 root index:IndexFullScan", | ||
" │ └─IndexFullScan 25.00 cop[tikv] table:t2, index:idx_bc(b, c) keep order:true", | ||
" └─TopN(Probe) 1.00 root test.t.a, offset:0, count:1", | ||
" └─IndexReader 1.00 root index:TopN", | ||
" └─TopN 1.00 cop[tikv] test.t.a, offset:0, count:1", | ||
" └─IndexRangeScan 6.00 cop[tikv] table:t1, index:idx_bc(b, c) range:[-inf,6], keep order:false" | ||
] | ||
}, | ||
{ | ||
|
@@ -433,13 +433,13 @@ | |
{ | ||
"Name": "TestIndexRead", | ||
"Cases": [ | ||
"IndexReader(Index(t.e)[[NULL,+inf]])->HashAgg", | ||
"IndexReader(Index(t.e)[[NULL,+inf]]->StreamAgg)->StreamAgg", | ||
"IndexReader(Index(t.e)[[-inf,10]]->StreamAgg)->StreamAgg", | ||
"IndexReader(Index(t.e)[[-inf,50]]->StreamAgg)->StreamAgg", | ||
"IndexReader(Index(t.b_c)[[NULL,+inf]]->Sel([gt(test.t.c, 1)])->HashAgg)->HashAgg", | ||
"IndexReader(Index(t.b_c)[[NULL,+inf]]->Sel([gt(test.t.c, 1)])->StreamAgg)->StreamAgg", | ||
"IndexLookUp(Index(t.e)[[1,1]], Table(t))->HashAgg", | ||
"TableReader(Table(t)->Sel([gt(test.t.e, 1)])->HashAgg)->HashAgg", | ||
"IndexLookUp(Index(t.b)[[-inf,20]], Table(t)->HashAgg)->HashAgg", | ||
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. Expected since cost of IndexLookup is under-estimated in model1. |
||
"TableReader(Table(t)->Sel([le(test.t.b, 20)])->StreamAgg)->StreamAgg", | ||
"TableReader(Table(t)->Sel([le(test.t.b, 30)])->StreamAgg)->StreamAgg", | ||
"TableReader(Table(t)->Sel([le(test.t.b, 40)])->StreamAgg)->StreamAgg", | ||
"TableReader(Table(t)->Sel([le(test.t.b, 50)])->StreamAgg)->StreamAgg", | ||
|
@@ -449,7 +449,7 @@ | |
"TableReader(Table(t)->Sel([le(test.t.b, 10000000000)]))", | ||
"TableReader(Table(t)->Sel([le(test.t.b, 50)]))", | ||
"TableReader(Table(t)->Sel([le(test.t.b, 100)])->Limit)->Limit", | ||
"IndexLookUp(Index(t.b)[[-inf,1]]->TopN([test.t.a],0,10), Table(t))->TopN([test.t.a],0,10)", | ||
"TableReader(Table(t)->Sel([le(test.t.b, 1)])->Limit)->Limit", | ||
"IndexLookUp(Index(t.b)[[1,1]], Table(t))", | ||
"IndexLookUp(Index(t.d)[[-inf,1991-09-05 00:00:00)], Table(t))", | ||
"IndexLookUp(Index(t.ts)[[-inf,1991-09-05 00:00:00)], Table(t))", | ||
|
@@ -501,10 +501,10 @@ | |
"SQL": "explain format = 'brief' select * from t where a <= 10000 order by b limit 1", | ||
"Plan": [ | ||
"TopN 1.00 root test.t.b, offset:0, count:1", | ||
"└─IndexLookUp 1.00 root ", | ||
" ├─IndexRangeScan(Build) 10000.00 cop[tikv] table:t, index:idx_a(a) range:[-inf,10000], keep order:false", | ||
" └─TopN(Probe) 1.00 cop[tikv] test.t.b, offset:0, count:1", | ||
" └─TableRowIDScan 10000.00 cop[tikv] table:t keep order:false" | ||
"└─TableReader 1.00 root data:TopN", | ||
" └─TopN 1.00 cop[tikv] test.t.b, offset:0, count:1", | ||
" └─Selection 10000.00 cop[tikv] le(test.t.a, 10000)", | ||
" └─TableFullScan 1000000.00 cop[tikv] table:t keep order:false" | ||
] | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Both sides are accepted since they have the same est-row 3333.33.