forked from pingcap/tidb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
140 additions
and
24 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[ | ||
{ | ||
"name": "TestPushLimitDownIndexLookUpReader", | ||
"cases": [ | ||
// Limit should be pushed down into IndexLookUpReader, row count of IndexLookUpReader and TableScan should be 1.00. | ||
"explain select * from tbl use index(idx_b_c) where b > 1 limit 2,1", | ||
// Projection atop IndexLookUpReader, Limit should be pushed down into IndexLookUpReader, and Projection should have row count 1.00 as well. | ||
"explain select * from tbl use index(idx_b_c) where b > 1 order by b desc limit 2,1", | ||
// Limit should be pushed down into IndexLookUpReader when Selection on top of IndexScan. | ||
"explain select * from tbl use index(idx_b_c) where b > 1 and c > 1 limit 2,1", | ||
// Limit should NOT be pushed down into IndexLookUpReader when Selection on top of TableScan. | ||
"explain select * from tbl use index(idx_b_c) where b > 1 and a > 1 limit 2,1" | ||
] | ||
}, | ||
{ | ||
"name": "TestIsFromUnixtimeNullRejective", | ||
"cases": [ | ||
// fix #12385 | ||
"explain select * from t t1 left join t t2 on t1.a=t2.a where from_unixtime(t2.b);" | ||
] | ||
} | ||
] |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[ | ||
{ | ||
"Name": "TestPushLimitDownIndexLookUpReader", | ||
"Cases": null | ||
}, | ||
{ | ||
"Name": "TestIsFromUnixtimeNullRejective", | ||
"Cases": [ | ||
{ | ||
"SQL": "explain select * from t t1 left join t t2 on t1.a=t2.a where from_unixtime(t2.b);", | ||
"Plan": [ | ||
"HashLeftJoin_8 9990.00 root inner join, inner:Selection_13, equal:[eq(test.t1.a, test.t2.a)]", | ||
"├─TableReader_12 9990.00 root data:Selection_11", | ||
"│ └─Selection_11 9990.00 cop not(isnull(test.t1.a))", | ||
"│ └─TableScan_10 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo", | ||
"└─Selection_13 7992.00 root from_unixtime(cast(test.t2.b))", | ||
" └─TableReader_16 9990.00 root data:Selection_15", | ||
" └─Selection_15 9990.00 cop not(isnull(test.t2.a))", | ||
" └─TableScan_14 10000.00 cop table:t2, range:[-inf,+inf], keep order:false, stats:pseudo" | ||
] | ||
} | ||
] | ||
} | ||
] |
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