diff --git a/go/vt/vtgate/planbuilder/operators/projection.go b/go/vt/vtgate/planbuilder/operators/projection.go index f3604a30620..787d3a3b1de 100644 --- a/go/vt/vtgate/planbuilder/operators/projection.go +++ b/go/vt/vtgate/planbuilder/operators/projection.go @@ -553,7 +553,10 @@ func (p *Projection) planOffsets(ctx *plancontext.PlanningContext) Operator { for _, pe := range ap { switch pe.Info.(type) { - case *Offset, *EvalEngine: + case Offset: + pe.EvalExpr = useOffsets(ctx, pe.EvalExpr, p) + continue + case *EvalEngine: continue } diff --git a/go/vt/vtgate/planbuilder/operators/projection_pushing.go b/go/vt/vtgate/planbuilder/operators/projection_pushing.go index 6df1caee5de..c1118184e06 100644 --- a/go/vt/vtgate/planbuilder/operators/projection_pushing.go +++ b/go/vt/vtgate/planbuilder/operators/projection_pushing.go @@ -144,7 +144,7 @@ func pushProjectionToOuter(ctx *plancontext.PlanningContext, p *Projection, sq * outer := TableID(sq.Outer) for _, pe := range ap { - _, isOffset := pe.Info.(*Offset) + _, isOffset := pe.Info.(Offset) if isOffset { continue } @@ -186,7 +186,7 @@ func pushProjectionToOuterContainer(ctx *plancontext.PlanningContext, p *Project outer := TableID(src.Outer) for _, pe := range ap { - _, isOffset := pe.Info.(*Offset) + _, isOffset := pe.Info.(Offset) if isOffset { continue }