Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: make sure we use the right Offset #15576

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading