Skip to content

Commit 2ccbd53

Browse files
committed
update condition in pushDerived to check for single shard routing
Signed-off-by: ChaitanyaD48 <[email protected]>
1 parent a49fba2 commit 2ccbd53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/vt/vtgate/planbuilder/operators/route_planning.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func pushDerived(ctx *plancontext.PlanningContext, op *Horizon) (Operator, *Appl
4444
return op, NoRewrite
4545
}
4646

47-
if !(innerRoute.Routing.OpCode() == engine.EqualUnique) && !op.IsMergeable(ctx) {
47+
if !innerRoute.Routing.OpCode().IsSingleShard() && !op.IsMergeable(ctx) {
4848
// no need to check anything if we are sure that we will only hit a single shard
4949
return op, NoRewrite
5050
}

0 commit comments

Comments
 (0)