forked from pingcap/tidb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*: fix panic when check null rejection for
from_unixtime
(pingcap#1…
- Loading branch information
Showing
5 changed files
with
138 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,22 @@ | ||
[ | ||
{ | ||
"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 10000.00 root inner join, inner:Selection_12, equal:[eq(test.t1.a, test.t2.a)]", | ||
"├─TableReader_11 10000.00 root data:TableScan_10", | ||
"│ └─TableScan_10 10000.00 cop table:t1, range:[-inf,+inf], keep order:false, stats:pseudo", | ||
"└─Selection_12 8000.00 root from_unixtime(cast(test.t2.b))", | ||
" └─TableReader_14 10000.00 root data:TableScan_13", | ||
" └─TableScan_13 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