From 8fcda622ef147c57a26a9e9547885e778cdc4a4e Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Mon, 23 Oct 2023 18:01:01 -0600 Subject: [PATCH] Fix how JSON query plan instructions is generated Signed-off-by: Florent Poinsard --- go/tools/macrobench/vtgate.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/tools/macrobench/vtgate.go b/go/tools/macrobench/vtgate.go index 0b04f0f22..6edb5c8c3 100644 --- a/go/tools/macrobench/vtgate.go +++ b/go/tools/macrobench/vtgate.go @@ -172,6 +172,7 @@ func getVTGateQueryPlans(port string) (VTGateQueryPlanMap, error) { if err != nil { return getOldVTGateQueryPlans(respBytes) } + res := make(map[string]VTGateQueryPlanValue) for key, plan := range response { // keeping only select statements if strings.HasPrefix(key, "select") { @@ -180,9 +181,10 @@ func getVTGateQueryPlans(port string) (VTGateQueryPlanMap, error) { return nil, err } plan.Instructions = string(jsonPlan) + res[key] = plan } } - return response, nil + return res, nil } func getOldVTGateQueryPlans(respBytes []byte) (VTGateQueryPlanMap, error) {