MCPcopy Create free account
hub / github.com/cloudspannerecosystem/spanner-cli / getMaxRelationalNodeID

Function getMaxRelationalNodeID

query_plan.go:277–288  ·  view source on GitHub ↗
(plan *pb.QueryPlan)

Source from the content-addressed store, hash-verified

275}
276
277func 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}

Callers 2

processPlanImplFunction · 0.85

Calls

no outgoing calls

Tested by 1