Skip to content

Commit

Permalink
plan: set proper parent for newly projection-eliminated child (pingca…
Browse files Browse the repository at this point in the history
  • Loading branch information
zz-jason authored and hanfei1991 committed Oct 10, 2017
1 parent 2ddcc2b commit a8db31d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plan/eliminate_projection.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ func resolveExprAndReplace(origin expression.Expression, replace map[string]*exp
func doPhysicalProjectionElimination(p PhysicalPlan) PhysicalPlan {
children := make([]Plan, 0, len(p.Children()))
for _, child := range p.Children() {
children = append(children, doPhysicalProjectionElimination(child.(PhysicalPlan)))
newChild := doPhysicalProjectionElimination(child.(PhysicalPlan))
children = append(children, newChild)
newChild.SetParents(p)
}
p.SetChildren(children...)

Expand Down

0 comments on commit a8db31d

Please sign in to comment.