Skip to content

Commit

Permalink
handle merged routes correctly
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 16, 2024
1 parent 5a5664c commit 9d29c98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion go/vt/vtgate/planbuilder/operators/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,8 @@ func (r *Route) GetOrdering(ctx *plancontext.PlanningContext) []OrderBy {
// in Inputs() and thus not a part of the operator tree
func (r *Route) TablesUsed(in []string) []string {
for _, mw := range r.MergedWith {
in = append(in, mw.TablesUsed(in)...)
used := TablesUsed(mw)
in = append(in, used...)
}
return in
}
Expand Down
3 changes: 1 addition & 2 deletions go/vt/vtgate/planbuilder/testdata/onecase.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
"query": "",
"plan": {
}
}
]
}

0 comments on commit 9d29c98

Please sign in to comment.