-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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 from cost model1 to model2 #39085
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
@@ -240,7 +241,7 @@ func TestPrepareCacheWithBinding(t *testing.T) { | |||
ps = []*util.ProcessInfo{tkProcess} | |||
tk.Session().SetSessionManager(&testkit.MockSessionManager{PS: ps}) | |||
res = tk.MustQuery("explain for connection " + strconv.FormatUint(tkProcess.ID, 10)) | |||
require.False(t, tk.HasPlan4ExplainFor(res, "IndexReader")) |
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.
Expected, TableScan -> IndexScan.
executor/join_test.go
Outdated
@@ -1468,25 +1469,23 @@ func TestIndexNestedLoopHashJoin(t *testing.T) { | |||
tk.MustExec("set @@tidb_index_join_batch_size=2") | |||
tk.MustQuery("desc format = 'brief' select * from t l1 where exists ( select * from t l2 where l2.l_orderkey = l1.l_orderkey and l2.l_suppkey <> l1.l_suppkey ) order by `l_orderkey`,`l_linenumber`;").Check(testkit.Rows( | |||
"Sort 7.20 root test.t.l_orderkey, test.t.l_linenumber", | |||
"└─IndexHashJoin 7.20 root semi join, inner:IndexLookUp, outer key:test.t.l_orderkey, inner key:test.t.l_orderkey, equal cond:eq(test.t.l_orderkey, test.t.l_orderkey), other cond:ne(test.t.l_suppkey, test.t.l_suppkey)", | |||
"└─HashJoin 7.20 root semi join, equal:[eq(test.t.l_orderkey, test.t.l_orderkey)], other cond:ne(test.t.l_suppkey, test.t.l_suppkey)", |
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.
Expected, HashJoin is more robust.
" └─TableFullScan_14 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo" | ||
"└─HashAgg_12(Probe) 8000.00 root group by:test.t1.a, funcs:firstrow(test.t1.a)->test.t1.a", | ||
" └─TableReader_13 8000.00 root data:HashAgg_8", | ||
" └─HashAgg_8 8000.00 cop[tikv] group by:test.t1.a, ", |
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.
Expected, pushing it down is safer.
"└─IndexReader_19 1.00 root index:StreamAgg_9", | ||
" └─StreamAgg_9 1.00 cop[tikv] funcs:count(1)->Column#7", | ||
" └─IndexRangeScan_17 99.90 cop[tikv] table:t1, index:idx2(c1, c2) range:[\"0xfff\" -inf,\"0xfff\" +inf], keep order:false, stats:pseudo")) | ||
"HashAgg_12 1.00 root funcs:count(Column#6)->Column#5", |
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.
Expected, model2 prefers to use HashAgg instead of StreamAgg.
"HashAgg 1.00 root funcs:count(Column#8)->Column#7", | ||
"└─TableReader 1.00 root data:ExchangeSender", | ||
" └─ExchangeSender 1.00 mpp[tiflash] ExchangeType: PassThrough", | ||
" └─HashAgg 1.00 mpp[tiflash] funcs:count(1)->Column#8", |
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.
Expected, pushing it down to the TiFlash is safer.
…o model2-ut-update
/merge |
This pull request has been accepted and is ready to merge. Commit hash: de79b12
|
/run-mysql-test |
TiDB MergeCI notify🔴 Bad News! New failing [1] after this pr merged.
|
What problem does this PR solve?
Issue Number: ref #35240
Problem Summary: planner: update some UTs from cost model1 to model2
What is changed and how it works?
planner: update some UTs from cost model1 to model2
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.