expr: switch off left push down due to intergration test failed (#33302)
close pingcap/tidb#33255, ref pingcap/tidb#33256
This commit is contained in:
@ -1246,11 +1246,6 @@ func TestExprPushDownToTiKV(t *testing.T) {
|
||||
retType: types.NewFieldType(mysql.TypeString),
|
||||
args: []Expression{stringColumn, intColumn},
|
||||
},
|
||||
{
|
||||
functionName: ast.Left,
|
||||
retType: types.NewFieldType(mysql.TypeString),
|
||||
args: []Expression{stringColumn, intColumn},
|
||||
},
|
||||
{
|
||||
functionName: ast.Sin,
|
||||
retType: types.NewFieldType(mysql.TypeDouble),
|
||||
|
||||
@ -975,7 +975,7 @@ func scalarExprSupportedByTiKV(sf *ScalarFunction) bool {
|
||||
ast.Length, ast.BitLength, ast.Concat, ast.ConcatWS, ast.Replace, ast.ASCII, ast.Hex,
|
||||
ast.Reverse, ast.LTrim, ast.RTrim, ast.Strcmp, ast.Space, ast.Elt, ast.Field,
|
||||
InternalFuncFromBinary, InternalFuncToBinary, ast.Mid, ast.Substring, ast.Substr, ast.CharLength,
|
||||
ast.Right, ast.Left,
|
||||
ast.Right, /* ast.Left */
|
||||
|
||||
// json functions.
|
||||
ast.JSONType, ast.JSONExtract, ast.JSONObject, ast.JSONArray, ast.JSONMerge, ast.JSONSet,
|
||||
|
||||
@ -2771,10 +2771,6 @@ func TestScalarFunctionPushDown(t *testing.T) {
|
||||
tk.MustQuery("explain analyze select /*+read_from_storage(tikv[t])*/ * from t where right(c,1);").
|
||||
CheckAt([]int{0, 3, 6}, rows)
|
||||
|
||||
rows[1][2] = "left(test.t.c, 1)"
|
||||
tk.MustQuery("explain analyze select /*+read_from_storage(tikv[t])*/ * from t where left(c,1);").
|
||||
CheckAt([]int{0, 3, 6}, rows)
|
||||
|
||||
rows[1][2] = "mod(test.t.id, test.t.id)"
|
||||
tk.MustQuery("explain analyze select /*+read_from_storage(tikv[t])*/ * from t where mod(id, id);").
|
||||
CheckAt([]int{0, 3, 6}, rows)
|
||||
|
||||
21
planner/core/testdata/integration_suite_out.json
vendored
21
planner/core/testdata/integration_suite_out.json
vendored
@ -2077,11 +2077,11 @@
|
||||
"SQL": "select /*+ use_index_merge(t1) */ 1 from t1 where c1 = 'ab' or c2 = '10' and char_length(left(c1, 10)) = 10;",
|
||||
"Plan": [
|
||||
"Projection 17.99 root 1->Column#5",
|
||||
"└─IndexMerge 0.04 root ",
|
||||
" ├─IndexRangeScan(Build) 10.00 cop[tikv] table:t1, index:c1(c1) range:[\"ab\",\"ab\"], keep order:false, stats:pseudo",
|
||||
" ├─IndexRangeScan(Build) 10.00 cop[tikv] table:t1, index:c2(c2) range:[\"10\",\"10\"], keep order:false, stats:pseudo",
|
||||
" └─Selection(Probe) 0.04 cop[tikv] or(eq(test.t1.c1, \"ab\"), and(eq(test.t1.c2, \"10\"), eq(char_length(left(test.t1.c1, 10)), 10)))",
|
||||
" └─TableRowIDScan 19.99 cop[tikv] table:t1 keep order:false, stats:pseudo"
|
||||
"└─Selection 0.04 root or(eq(test.t1.c1, \"ab\"), and(eq(test.t1.c2, \"10\"), eq(char_length(left(test.t1.c1, 10)), 10)))",
|
||||
" └─IndexMerge 19.99 root ",
|
||||
" ├─IndexRangeScan(Build) 10.00 cop[tikv] table:t1, index:c1(c1) range:[\"ab\",\"ab\"], keep order:false, stats:pseudo",
|
||||
" ├─IndexRangeScan(Build) 10.00 cop[tikv] table:t1, index:c2(c2) range:[\"10\",\"10\"], keep order:false, stats:pseudo",
|
||||
" └─TableRowIDScan(Probe) 19.99 cop[tikv] table:t1 keep order:false, stats:pseudo"
|
||||
],
|
||||
"Res": [
|
||||
"1"
|
||||
@ -2105,12 +2105,11 @@
|
||||
"SQL": "select /*+ use_index_merge( tt2 ) */ 1 from tt2 where tt2.c1 in (-3896405) or tt2.pk in (1, 53330) and to_base64(left(pk, 5));",
|
||||
"Plan": [
|
||||
"Projection 2.60 root 1->Column#3",
|
||||
"└─IndexMerge 0.00 root ",
|
||||
" ├─IndexRangeScan(Build) 1.00 cop[tikv] table:tt2, index:c1(c1) range:[-3896405,-3896405], keep order:false, stats:pseudo",
|
||||
" ├─Selection(Build) 1.60 cop[tikv] istrue_with_null(cast(to_base64(left(cast(test.tt2.pk, var_string(20)), 5)), double BINARY))",
|
||||
" │ └─TableRangeScan 2.00 cop[tikv] table:tt2 range:[1,1], [53330,53330], keep order:false, stats:pseudo",
|
||||
" └─Selection(Probe) 0.00 cop[tikv] or(eq(test.tt2.c1, -3896405), and(in(test.tt2.pk, 1, 53330), istrue_with_null(cast(to_base64(left(cast(test.tt2.pk, var_string(20)), 5)), double BINARY))))",
|
||||
" └─TableRowIDScan 3.00 cop[tikv] table:tt2 keep order:false, stats:pseudo"
|
||||
"└─Selection 0.00 root or(eq(test.tt2.c1, -3896405), and(in(test.tt2.pk, 1, 53330), istrue_with_null(cast(to_base64(left(cast(test.tt2.pk, var_string(20)), 5)), double BINARY))))",
|
||||
" └─IndexMerge 3.00 root ",
|
||||
" ├─IndexRangeScan(Build) 1.00 cop[tikv] table:tt2, index:c1(c1) range:[-3896405,-3896405], keep order:false, stats:pseudo",
|
||||
" ├─TableRangeScan(Build) 2.00 cop[tikv] table:tt2 range:[1,1], [53330,53330], keep order:false, stats:pseudo",
|
||||
" └─TableRowIDScan(Probe) 3.00 cop[tikv] table:tt2 keep order:false, stats:pseudo"
|
||||
],
|
||||
"Res": [
|
||||
"1"
|
||||
|
||||
Reference in New Issue
Block a user