github.com/XiaoMi/Gaea@v1.2.5/proxy/plan/plan_exec_test.go (about) 1 package plan 2 3 import ( 4 "testing" 5 6 "github.com/XiaoMi/Gaea/parser" 7 "github.com/XiaoMi/Gaea/util" 8 ) 9 10 func TestExecuteIn(t *testing.T) { 11 planInfo, _ := preparePlanInfo() 12 sql := "SELECT * FROM tbl_mycat_murmur WHERE tbl_mycat_murmur.id=5 AND tbl_mycat_murmur.id=4" 13 stmt, _ := parser.ParseSQL(sql) 14 plan, err := BuildPlan(stmt, nil, "db_mycat", sql, planInfo.rt, planInfo.seqs) 15 if err != nil { 16 t.Fatalf("build plan error: %v", err) 17 } 18 ret, err := plan.ExecuteIn(util.NewRequestContext(), nil) 19 if err != nil { 20 t.Fatalf("execute error: %v", err) 21 } 22 t.Logf("result: %v", ret) 23 }