Skip to content

Commit

Permalink
refactor: clean up join expression logic
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Mar 22, 2024
1 parent c830723 commit f605f62
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions go/vt/vtgate/planbuilder/operators/apply_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func (aj *ApplyJoin) AddJoinPredicate(ctx *plancontext.PlanningContext, expr sql
}
col := breakExpressionInLHSandRHSForApplyJoin(ctx, expr, TableID(aj.LHS))
aj.JoinPredicates.add(col)
ctx.AddJoinPredicates(expr, col.RHSExpr)
rhs := aj.RHS.AddPredicate(ctx, col.RHSExpr)
aj.RHS = rhs
}
Expand Down
1 change: 0 additions & 1 deletion go/vt/vtgate/planbuilder/operators/expressions.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func breakExpressionInLHSandRHSForApplyJoin(
cursor.Replace(arg)
}, nil).(sqlparser.Expr)

ctx.AddJoinPredicates(expr, rewrittenExpr)
col.RHSExpr = rewrittenExpr
col.Original = expr
return
Expand Down

0 comments on commit f605f62

Please sign in to comment.