Skip to content

Commit

Permalink
added comments
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <[email protected]>
  • Loading branch information
harshit-gangal committed Jan 6, 2025
1 parent 874322e commit 93bbbe7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions go/vt/vtgate/planbuilder/operators/join_merging.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ func getRoutesOrAlternates(ctx *plancontext.PlanningContext, lhsRoute, rhsRoute
return lhsRoute, rhsRoute, routingA, routingB, sameKeyspace
}

// If we have a reference route, we will try to find an alternate route in same keyspace as other routing keyspace.
// If the reference route is part of DML table update target, alternate keyspace route cannot be considered.
if refA, ok := routingA.(*AnyShardRouting); ok &&
!TableID(lhsRoute).IsOverlapping(ctx.SemTable.DMLTargets) {
if altARoute := refA.AlternateInKeyspace(routingB.Keyspace()); altARoute != nil {
Expand Down

0 comments on commit 93bbbe7

Please sign in to comment.