[
  {
    "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_4 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_4 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_4 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_9 10.00 root  index:Projection_5",
              "└─Projection_5 10.00 cop[tikv]  test.t1.a",
              "  └─IndexRangeScan_8 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_9 10.00 root  index:Projection_5",
              "└─Projection_5 10.00 cop[tikv]  test.t1.a",
              "  └─IndexRangeScan_8 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_9 10.00 root  index:Projection_5",
              "└─Projection_5 10.00 cop[tikv]  test.t1.a",
              "  └─IndexRangeScan_8 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_9 10.00 root  index:Projection_5",
              "└─Projection_5 10.00 cop[tikv]  test.t1.a",
              "  └─IndexRangeScan_8 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_36 124.88 root  inner join, equal:[eq(test.t1.a, test.t2.a)]",
              "├─IndexLookUp_51(Build) 99.90 root  ",
              "│ ├─IndexRangeScan_49(Build) 99.90 cop[tikv] table:t2, index:b(b, a) range:[1 -inf,1 +inf], keep order:false, stats:pseudo",
              "│ └─TableRowIDScan_50(Probe) 99.90 cop[tikv] table:t2 keep order:false, stats:pseudo",
              "└─IndexLookUp_48(Probe) 99.90 root  ",
              "  ├─IndexRangeScan_46(Build) 99.90 cop[tikv] table:t1, index:b(b, a) range:[1 -inf,1 +inf], keep order:false, stats:pseudo",
              "  └─TableRowIDScan_47(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_36 124.88 root  inner join, equal:[eq(test.t1.a, test.t2.a)]",
              "├─IndexLookUp_51(Build) 99.90 root  ",
              "│ ├─IndexRangeScan_49(Build) 99.90 cop[tikv] table:t2, index:b(b, a) range:[2 -inf,2 +inf], keep order:false, stats:pseudo",
              "│ └─TableRowIDScan_50(Probe) 99.90 cop[tikv] table:t2 keep order:false, stats:pseudo",
              "└─IndexLookUp_48(Probe) 99.90 root  ",
              "  ├─IndexRangeScan_46(Build) 99.90 cop[tikv] table:t1, index:b(b, a) range:[2 -inf,2 +inf], keep order:false, stats:pseudo",
              "  └─TableRowIDScan_47(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_36 124.88 root  inner join, equal:[eq(test.t1.a, test.t2.a)]",
              "├─IndexLookUp_51(Build) 99.90 root  ",
              "│ ├─IndexRangeScan_49(Build) 99.90 cop[tikv] table:t2, index:b(b, a) range:[0 -inf,0 +inf], keep order:false, stats:pseudo",
              "│ └─TableRowIDScan_50(Probe) 99.90 cop[tikv] table:t2 keep order:false, stats:pseudo",
              "└─IndexLookUp_48(Probe) 99.90 root  ",
              "  ├─IndexRangeScan_46(Build) 99.90 cop[tikv] table:t1, index:b(b, a) range:[0 -inf,0 +inf], keep order:false, stats:pseudo",
              "  └─TableRowIDScan_47(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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_4 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_7 8000.00 root  index:Selection_6",
          "└─Selection_6 8000.00 cop[tikv]  gt(plus(test.t.a, 0), 1)",
          "  └─IndexFullScan_5 10000.00 cop[tikv] table:t, index:a(a) keep order:false, stats:pseudo"
        ],
        "FromCache": "0"
      },
      {
        "Result": [
          "6"
        ],
        "Plan": [
          "IndexReader_7 8000.00 root  index:Selection_6",
          "└─Selection_6 8000.00 cop[tikv]  gt(plus(test.t.a, 0), 5)",
          "  └─IndexFullScan_5 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_7 3333.33 root  data:Selection_6",
          "└─Selection_6 3333.33 cop[tikv]  gt(test.t.b, 1)",
          "  └─TableFullScan_5 10000.00 cop[tikv] table:t keep order:false, stats:pseudo"
        ],
        "FromCache": "0"
      },
      {
        "Result": [
          "6 6 6"
        ],
        "Plan": [
          "TableReader_7 3333.33 root  data:Selection_6",
          "└─Selection_6 3333.33 cop[tikv]  gt(test.t.b, 5)",
          "  └─TableFullScan_5 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_9 2666.67 root  ",
          "├─Selection_7(Build) 8000.00 cop[tikv]  gt(plus(test.t.a, 0), 1)",
          "│ └─IndexFullScan_5 10000.00 cop[tikv] table:t, index:a(a) keep order:false, stats:pseudo",
          "└─Selection_8(Probe) 2666.67 cop[tikv]  gt(test.t.b, 1)",
          "  └─TableRowIDScan_6 8000.00 cop[tikv] table:t keep order:false, stats:pseudo"
        ],
        "FromCache": "0"
      },
      {
        "Result": [
          "6 6 6"
        ],
        "Plan": [
          "IndexLookUp_9 2666.67 root  ",
          "├─Selection_7(Build) 8000.00 cop[tikv]  gt(plus(test.t.a, 0), 5)",
          "│ └─IndexFullScan_5 10000.00 cop[tikv] table:t, index:a(a) keep order:false, stats:pseudo",
          "└─Selection_8(Probe) 2666.67 cop[tikv]  gt(test.t.b, 5)",
          "  └─TableRowIDScan_6 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_7 10.00 root  offset:0, count:10",
          "└─TableReader_11 10.00 root  data:Limit_10",
          "  └─Limit_10 10.00 cop[tikv]  offset:0, count:10",
          "    └─TableFullScan_9 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_7 20.00 root  offset:0, count:20",
          "└─TableReader_11 20.00 root  data:Limit_10",
          "  └─Limit_10 20.00 cop[tikv]  offset:0, count:20",
          "    └─TableFullScan_9 20.00 cop[tikv] table:t keep order:false, stats:pseudo"
        ],
        "FromCache": "0"
      },
      {
        "Result": null,
        "Plan": null,
        "FromCache": ""
      },
      {
        "Result": [
          "1 1 1"
        ],
        "Plan": [
          "TopN_7 1.00 root  test.t.b, offset:0, count:1",
          "└─TableReader_14 1.00 root  data:TopN_13",
          "  └─TopN_13 1.00 cop[tikv]  test.t.b, offset:0, count:1",
          "    └─TableFullScan_12 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_7 5.00 root  test.t.b, offset:0, count:5",
          "└─TableReader_14 5.00 root  data:TopN_13",
          "  └─TopN_13 5.00 cop[tikv]  test.t.b, offset:0, count:5",
          "    └─TableFullScan_12 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_9 8000.00 root  group by:test.t.b, funcs:sum(Column#6)->Column#5, funcs:firstrow(test.t.b)->test.t.b",
          "  └─TableReader_10 8000.00 root  data:HashAgg_5",
          "    └─HashAgg_5 8000.00 cop[tikv]  group by:test.t.b, funcs:sum(plus(test.t.c, 1))->Column#6",
          "      └─TableFullScan_8 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_9 8000.00 root  group by:test.t.b, funcs:sum(Column#6)->Column#5, funcs:firstrow(test.t.b)->test.t.b",
          "  └─TableReader_10 8000.00 root  data:HashAgg_5",
          "    └─HashAgg_5 8000.00 cop[tikv]  group by:test.t.b, funcs:sum(plus(test.t.c, 5))->Column#6",
          "      └─TableFullScan_8 10000.00 cop[tikv] table:t keep order:false, stats:pseudo"
        ],
        "FromCache": "1"
      }
    ]
  }
]
