Files
tidb/pkg/executor/testdata/prepare_suite_out.json
2025-09-12 05:01:51 +00:00

1277 lines
38 KiB
JSON

[
{
"Name": "TestPlanCacheWithDifferentVariableTypes",
"Cases": [
{
"PrepareStmt": "prepare stmt from \"select ?, ?\"",
"Executes": [
{
"SQL": "execute stmt using @v1, @v2",
"Vars": [
{
"Name": "v1",
"Value": "1"
},
{
"Name": "v2",
"Value": "2"
}
],
"Plan": [
"Projection_3 1.00 root 1->Column#1, 2->Column#2",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"1 2"
]
},
{
"SQL": "execute stmt using @v1, @v2",
"Vars": [
{
"Name": "v1",
"Value": "1"
},
{
"Name": "v2",
"Value": "\"abc\""
}
],
"Plan": [
"Projection_3 1.00 root 1->Column#1, abc->Column#2",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"1 abc"
]
},
{
"SQL": "execute stmt using @v1, @v2",
"Vars": [
{
"Name": "v1",
"Value": "10"
},
{
"Name": "v2",
"Value": "\"cba\""
}
],
"Plan": [
"Projection_3 1.00 root 10->Column#1, cba->Column#2",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"10 cba"
]
}
]
},
{
"PrepareStmt": "prepare stmt from \"select a from t1 where t1.b = ?\"",
"Executes": [
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "3"
}
],
"Plan": [
"IndexReader_10 10.00 root index:Projection_6",
"└─Projection_6 10.00 cop[tikv] test.t1.a",
" └─IndexRangeScan_9 10.00 cop[tikv] table:t1, index:b(b, a) range:[3,3], keep order:false, stats:pseudo"
],
"LastPlanUseCache": "0",
"Result": [
"3"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "2"
}
],
"Plan": [
"IndexReader_10 10.00 root index:Projection_6",
"└─Projection_6 10.00 cop[tikv] test.t1.a",
" └─IndexRangeScan_9 10.00 cop[tikv] table:t1, index:b(b, a) range:[2,2], keep order:false, stats:pseudo"
],
"LastPlanUseCache": "1",
"Result": [
"2"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "-200"
}
],
"Plan": [
"IndexReader_10 10.00 root index:Projection_6",
"└─Projection_6 10.00 cop[tikv] test.t1.a",
" └─IndexRangeScan_9 10.00 cop[tikv] table:t1, index:b(b, a) range:[-200,-200], keep order:false, stats:pseudo"
],
"LastPlanUseCache": "1",
"Result": null
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"abc\""
}
],
"Plan": [
"IndexReader_10 10.00 root index:Projection_6",
"└─Projection_6 10.00 cop[tikv] test.t1.a",
" └─IndexRangeScan_9 10.00 cop[tikv] table:t1, index:b(b, a) range:[0,0], keep order:false, stats:pseudo"
],
"LastPlanUseCache": "0",
"Result": null
}
]
},
{
"PrepareStmt": "prepare stmt from \"select t1.c, t2.c from t1 join t2 on t1.b = t2.b and t1.a = t2.a where t1.b = ?\"",
"Executes": [
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "1"
}
],
"Plan": [
"HashJoin_24 124.88 root inner join, equal:[eq(test.t1.a, test.t2.a) eq(test.t1.b, test.t2.b)]",
"├─IndexLookUp_47(Build) 99.90 root ",
"│ ├─IndexRangeScan_45(Build) 99.90 cop[tikv] table:t2, index:b(b, a) range:[1 -inf,1 +inf], keep order:false, stats:pseudo",
"│ └─TableRowIDScan_46(Probe) 99.90 cop[tikv] table:t2 keep order:false, stats:pseudo",
"└─IndexLookUp_36(Probe) 99.90 root ",
" ├─IndexRangeScan_34(Build) 99.90 cop[tikv] table:t1, index:b(b, a) range:[1 -inf,1 +inf], keep order:false, stats:pseudo",
" └─TableRowIDScan_35(Probe) 99.90 cop[tikv] table:t1 keep order:false, stats:pseudo"
],
"LastPlanUseCache": "0",
"Result": null
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "2"
}
],
"Plan": [
"HashJoin_24 124.88 root inner join, equal:[eq(test.t1.a, test.t2.a) eq(test.t1.b, test.t2.b)]",
"├─IndexLookUp_47(Build) 99.90 root ",
"│ ├─IndexRangeScan_45(Build) 99.90 cop[tikv] table:t2, index:b(b, a) range:[2 -inf,2 +inf], keep order:false, stats:pseudo",
"│ └─TableRowIDScan_46(Probe) 99.90 cop[tikv] table:t2 keep order:false, stats:pseudo",
"└─IndexLookUp_36(Probe) 99.90 root ",
" ├─IndexRangeScan_34(Build) 99.90 cop[tikv] table:t1, index:b(b, a) range:[2 -inf,2 +inf], keep order:false, stats:pseudo",
" └─TableRowIDScan_35(Probe) 99.90 cop[tikv] table:t1 keep order:false, stats:pseudo"
],
"LastPlanUseCache": "1",
"Result": [
"222 222"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"abc\""
}
],
"Plan": [
"HashJoin_24 124.88 root inner join, equal:[eq(test.t1.a, test.t2.a) eq(test.t1.b, test.t2.b)]",
"├─IndexLookUp_47(Build) 99.90 root ",
"│ ├─IndexRangeScan_45(Build) 99.90 cop[tikv] table:t2, index:b(b, a) range:[0 -inf,0 +inf], keep order:false, stats:pseudo",
"│ └─TableRowIDScan_46(Probe) 99.90 cop[tikv] table:t2 keep order:false, stats:pseudo",
"└─IndexLookUp_36(Probe) 99.90 root ",
" ├─IndexRangeScan_34(Build) 99.90 cop[tikv] table:t1, index:b(b, a) range:[0 -inf,0 +inf], keep order:false, stats:pseudo",
" └─TableRowIDScan_35(Probe) 99.90 cop[tikv] table:t1 keep order:false, stats:pseudo"
],
"LastPlanUseCache": "0",
"Result": null
}
]
},
{
"PrepareStmt": "prepare stmt from \"select cast(? as decimal)\"",
"Executes": [
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"123456789"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(1234567.1234567, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"1234567"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(0.99999, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"1"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(99999.0, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"99999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-123456789"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-1234567.1234567, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-1234567"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-0.99999, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-1"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-99999.0, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-99999"
]
}
]
},
{
"PrepareStmt": "prepare stmt from \"select cast(? as decimal(10,0))\"",
"Executes": [
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"123456789"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(1234567.1234567, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"1234567"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(0.99999, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"1"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(99999.0, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"99999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-123456789"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-1234567.1234567, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-1234567"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-0.99999, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-1"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-99999.0, decimal(10,0) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-99999"
]
}
]
},
{
"PrepareStmt": "prepare stmt from \"select cast(? as decimal(5,4))\"",
"Executes": [
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(5,4) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"9.9999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(1234567.1234567, decimal(5,4) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"9.9999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(0.99999, decimal(5,4) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"1.0000"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(99999.0, decimal(5,4) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"9.9999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decimal(5,4) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-9.9999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-1234567.1234567, decimal(5,4) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-9.9999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-0.99999, decimal(5,4) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-1.0000"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-99999.0, decimal(5,4) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-9.9999"
]
}
]
},
{
"PrepareStmt": "prepare stmt from \"select cast(? as decimal(64, 30))\"",
"Executes": [
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(64,30) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"123456789.012345678901234567890123456789"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(1234567.1234567, decimal(64,30) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"1234567.123456700000000000000000000000"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(0.99999, decimal(64,30) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"0.999990000000000000000000000000"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(99999.0, decimal(64,30) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"99999.000000000000000000000000000000"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decimal(64,30) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-123456789.012345678901234567890123456789"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-1234567.1234567, decimal(64,30) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-1234567.123456700000000000000000000000"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-0.99999, decimal(64,30) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-0.999990000000000000000000000000"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-99999.0, decimal(64,30) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-99999.000000000000000000000000000000"
]
}
]
},
{
"PrepareStmt": "prepare stmt from \"select cast(? as decimal(15,5))\"",
"Executes": [
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(15,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"123456789.01235"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(1234567.1234567, decimal(15,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"1234567.12346"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(0.99999, decimal(15,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"0.99999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(99999.0, decimal(15,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"99999.00000"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decimal(15,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-123456789.01235"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-1234567.1234567, decimal(15,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-1234567.12346"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-0.99999, decimal(15,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-0.99999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-99999.0, decimal(15,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-99999.00000"
]
}
]
},
{
"PrepareStmt": "prepare stmt from \"select cast(? as decimal(5,5))\"",
"Executes": [
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(123456789.0123456789012345678901234567890123456789, decimal(5,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"0.99999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(1234567.1234567, decimal(5,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"0.99999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(0.99999, decimal(5,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"0.99999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(99999.0, decimal(5,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"0.99999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-123456789.0123456789012345678901234567890123456789\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-123456789.0123456789012345678901234567890123456789, decimal(5,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-0.99999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-1234567.1234567\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-1234567.1234567, decimal(5,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-0.99999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-0.99999\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-0.99999, decimal(5,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-0.99999"
]
},
{
"SQL": "execute stmt using @v1",
"Vars": [
{
"Name": "v1",
"Value": "\"-99999.0\""
}
],
"Plan": [
"Projection_3 1.00 root cast(-99999.0, decimal(5,5) BINARY)->Column#1",
"└─TableDual_5 1.00 root rows:1"
],
"LastPlanUseCache": "0",
"Result": [
"-0.99999"
]
}
]
}
]
},
{
"Name": "TestParameterPushDown",
"Cases": [
{
"Result": null,
"Plan": null,
"FromCache": ""
},
{
"Result": [
"2",
"3",
"4",
"5",
"6"
],
"Plan": [
"IndexReader_8 8000.00 root index:Selection_7",
"└─Selection_7 8000.00 cop[tikv] gt(plus(test.t.a, 0), 1)",
" └─IndexFullScan_6 10000.00 cop[tikv] table:t, index:a(a) keep order:false, stats:pseudo"
],
"FromCache": "0"
},
{
"Result": [
"6"
],
"Plan": [
"IndexReader_8 8000.00 root index:Selection_7",
"└─Selection_7 8000.00 cop[tikv] gt(plus(test.t.a, 0), 5)",
" └─IndexFullScan_6 10000.00 cop[tikv] table:t, index:a(a) keep order:false, stats:pseudo"
],
"FromCache": "1"
},
{
"Result": null,
"Plan": null,
"FromCache": ""
},
{
"Result": [
"2 2 2",
"3 3 3",
"4 4 4",
"5 5 5",
"6 6 6"
],
"Plan": [
"TableReader_8 3333.33 root data:Selection_7",
"└─Selection_7 3333.33 cop[tikv] gt(test.t.b, 1)",
" └─TableFullScan_6 10000.00 cop[tikv] table:t keep order:false, stats:pseudo"
],
"FromCache": "0"
},
{
"Result": [
"6 6 6"
],
"Plan": [
"TableReader_8 3333.33 root data:Selection_7",
"└─Selection_7 3333.33 cop[tikv] gt(test.t.b, 5)",
" └─TableFullScan_6 10000.00 cop[tikv] table:t keep order:false, stats:pseudo"
],
"FromCache": "1"
},
{
"Result": null,
"Plan": null,
"FromCache": ""
},
{
"Result": [
"2 2 2",
"3 3 3",
"4 4 4",
"5 5 5",
"6 6 6"
],
"Plan": [
"IndexLookUp_10 2666.67 root ",
"├─Selection_8(Build) 8000.00 cop[tikv] gt(plus(test.t.a, 0), 1)",
"│ └─IndexFullScan_6 10000.00 cop[tikv] table:t, index:a(a) keep order:false, stats:pseudo",
"└─Selection_9(Probe) 2666.67 cop[tikv] gt(test.t.b, 1)",
" └─TableRowIDScan_7 8000.00 cop[tikv] table:t keep order:false, stats:pseudo"
],
"FromCache": "0"
},
{
"Result": [
"6 6 6"
],
"Plan": [
"IndexLookUp_10 2666.67 root ",
"├─Selection_8(Build) 8000.00 cop[tikv] gt(plus(test.t.a, 0), 5)",
"│ └─IndexFullScan_6 10000.00 cop[tikv] table:t, index:a(a) keep order:false, stats:pseudo",
"└─Selection_9(Probe) 2666.67 cop[tikv] gt(test.t.b, 5)",
" └─TableRowIDScan_7 8000.00 cop[tikv] table:t keep order:false, stats:pseudo"
],
"FromCache": "1"
},
{
"Result": null,
"Plan": null,
"FromCache": ""
},
{
"Result": [
"1 1 1",
"2 2 2",
"3 3 3",
"4 4 4",
"5 5 5",
"6 6 6"
],
"Plan": [
"Limit_8 10.00 root offset:0, count:10",
"└─TableReader_14 10.00 root data:Limit_13",
" └─Limit_13 10.00 cop[tikv] offset:0, count:10",
" └─TableFullScan_12 10.00 cop[tikv] table:t keep order:false, stats:pseudo"
],
"FromCache": "0"
},
{
"Result": [
"1 1 1",
"2 2 2",
"3 3 3",
"4 4 4",
"5 5 5",
"6 6 6"
],
"Plan": [
"Limit_8 20.00 root offset:0, count:20",
"└─TableReader_14 20.00 root data:Limit_13",
" └─Limit_13 20.00 cop[tikv] offset:0, count:20",
" └─TableFullScan_12 20.00 cop[tikv] table:t keep order:false, stats:pseudo"
],
"FromCache": "0"
},
{
"Result": null,
"Plan": null,
"FromCache": ""
},
{
"Result": [
"1 1 1"
],
"Plan": [
"TopN_8 1.00 root test.t.b, offset:0, count:1",
"└─TableReader_17 1.00 root data:TopN_16",
" └─TopN_16 1.00 cop[tikv] test.t.b, offset:0, count:1",
" └─TableFullScan_15 10000.00 cop[tikv] table:t keep order:false, stats:pseudo"
],
"FromCache": "0"
},
{
"Result": [
"1 1 1",
"2 2 2",
"3 3 3",
"4 4 4",
"5 5 5"
],
"Plan": [
"TopN_8 5.00 root test.t.b, offset:0, count:5",
"└─TableReader_17 5.00 root data:TopN_16",
" └─TopN_16 5.00 cop[tikv] test.t.b, offset:0, count:5",
" └─TableFullScan_15 10000.00 cop[tikv] table:t keep order:false, stats:pseudo"
],
"FromCache": "0"
},
{
"Result": null,
"Plan": null,
"FromCache": ""
},
{
"Result": [
"1 2",
"2 3",
"3 4",
"4 5",
"5 6",
"6 7"
],
"Plan": [
"Projection_4 8000.00 root test.t.b, Column#5",
"└─HashAgg_13 8000.00 root group by:test.t.b, funcs:sum(Column#6)->Column#5, funcs:firstrow(test.t.b)->test.t.b",
" └─TableReader_14 8000.00 root data:HashAgg_6",
" └─HashAgg_6 8000.00 cop[tikv] group by:test.t.b, funcs:sum(plus(test.t.c, 1))->Column#6",
" └─TableFullScan_12 10000.00 cop[tikv] table:t keep order:false, stats:pseudo"
],
"FromCache": "0"
},
{
"Result": [
"1 6",
"2 7",
"3 8",
"4 9",
"5 10",
"6 11"
],
"Plan": [
"Projection_4 8000.00 root test.t.b, Column#5",
"└─HashAgg_13 8000.00 root group by:test.t.b, funcs:sum(Column#6)->Column#5, funcs:firstrow(test.t.b)->test.t.b",
" └─TableReader_14 8000.00 root data:HashAgg_6",
" └─HashAgg_6 8000.00 cop[tikv] group by:test.t.b, funcs:sum(plus(test.t.c, 5))->Column#6",
" └─TableFullScan_12 10000.00 cop[tikv] table:t keep order:false, stats:pseudo"
],
"FromCache": "1"
}
]
}
]