Skip to content

Commit

Permalink
Merge pull request #470 from vitessio/fix-query-plan-json
Browse files Browse the repository at this point in the history
  • Loading branch information
frouioui authored Oct 24, 2023
2 parents ca74e63 + 8fcda62 commit bc867e1
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 bc867e1

Please sign in to comment.