Skip to content

Commit

Permalink
Update go/vt/vtgate/planbuilder/operators/projection_pushing.go
Browse files Browse the repository at this point in the history
Co-authored-by: Florent Poinsard <[email protected]>
Signed-off-by: Andrés Taylor <[email protected]>
  • Loading branch information
systay and frouioui committed Feb 6, 2024
1 parent 7754ade commit 5d30fd0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions go/vt/vtgate/planbuilder/operators/projection_pushing.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,8 @@ func (p *projector) get(ctx *plancontext.PlanningContext, expr sqlparser.Expr) s
func (p *projector) claimUnusedAlias(ae *sqlparser.AliasedExpr) string {
bare := ae.ColumnName()
alias := bare
var i int64 = 0

for slices.Index(p.columnAliases, alias) > -1 {
for i := int64(0); slices.Index(p.columnAliases, alias) > -1; i++ {
alias = bare + strconv.FormatInt(i, 10)
i++
}
return alias
}
Expand Down

0 comments on commit 5d30fd0

Please sign in to comment.