Skip to content

Commit

Permalink
Fix how JSON query plan instructions is generated
Browse files Browse the repository at this point in the history
Signed-off-by: Florent Poinsard <[email protected]>
  • Loading branch information
frouioui committed Oct 24, 2023
1 parent ca74e63 commit 8fcda62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion go/tools/macrobench/vtgate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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) {
Expand Down

0 comments on commit 8fcda62

Please sign in to comment.