Skip to content

Commit

Permalink
cleanup: make sure we use the right Offset (#15576)
Browse files Browse the repository at this point in the history
  • Loading branch information
systay authored Mar 26, 2024
1 parent 7355d99 commit 6976baa
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 6976baa

Please sign in to comment.