Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <andres@planetscale.com>
  • Loading branch information
systay committed Jun 11, 2024
1 parent 63d02d4 commit 3f7b825
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions go/vt/vtgate/planbuilder/operators/subquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,3 @@ func (sq *SubQuery) rewriteColNameToArgument(expr sqlparser.Expr) sqlparser.Expr

return sqlparser.Rewrite(expr, pre, nil).(sqlparser.Expr)
}

func (sq *SubQuery) Compact(*plancontext.PlanningContext) (Operator, *ApplyResult) {
other, ok := sq.Outer.(*SubQuery)
if !ok {
return sq, NoRewrite
}
if other.ArgName == sq.ArgName {
// we can remove this subquery because it's a duplicate
sq.Outer = other.Outer
return sq, Rewrote("removed duplicate subquery")
}

return sq, NoRewrite
}

0 comments on commit 3f7b825

Please sign in to comment.