Skip to content

Commit

Permalink
chore cleanup: make sure we use the right Offset
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Mar 26, 2024
1 parent e9c8d52 commit 9247cad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion go/vt/vtgate/planbuilder/operators/projection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions go/vt/vtgate/planbuilder/operators/projection_pushing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 9247cad

Please sign in to comment.