Skip to content

Commit

Permalink
only report the expressions coming from the RHS
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <andres@planetscale.com>
  • Loading branch information
systay committed Sep 5, 2024
1 parent f80c878 commit 6cb6862
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go/vt/vtgate/planbuilder/operators/values_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (vj *ValuesJoin) GetColumns(ctx *plancontext.PlanningContext) []*sqlparser.
}

func (vj *ValuesJoin) GetSelectExprs(ctx *plancontext.PlanningContext) sqlparser.SelectExprs {
return append(vj.LHS.GetSelectExprs(ctx), vj.RHS.GetSelectExprs(ctx)...)
return vj.RHS.GetSelectExprs(ctx)
}

func (vj *ValuesJoin) ShortDescription() string {
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/planbuilder/testdata/onecase.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"comment": "Add your test case here for debugging and run go test -run=One.",
"query": "",
"query": "select u.foo+ue.bar from user u join user_extra ue on u.val = ue.user_id",
"plan": {
}
}
Expand Down

0 comments on commit 6cb6862

Please sign in to comment.