(plan *pb.QueryPlan)
| 275 | } |
| 276 | |
| 277 | func getMaxRelationalNodeID(plan *pb.QueryPlan) int32 { |
| 278 | var maxRelationalNodeID int32 |
| 279 | // We assume that plan_nodes[] is pre-sorted in ascending order. |
| 280 | // See QueryPlan.plan_nodes[] in the document. |
| 281 | // https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.v1?hl=en#google.spanner.v1.QueryPlan.FIELDS.repeated.google.spanner.v1.PlanNode.google.spanner.v1.QueryPlan.plan_nodes |
| 282 | for _, planNode := range plan.GetPlanNodes() { |
| 283 | if planNode.GetKind() == pb.PlanNode_RELATIONAL { |
| 284 | maxRelationalNodeID = planNode.Index |
| 285 | } |
| 286 | } |
| 287 | return maxRelationalNodeID |
| 288 | } |
no outgoing calls