From cae84363e3265270b2a3555c4c0581c0a0d0bd9f Mon Sep 17 00:00:00 2001 From: Andrew Sisley Date: Thu, 8 Feb 2024 17:34:47 -0500 Subject: [PATCH] Simplify adding child to parallel node --- planner/multi.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/planner/multi.go b/planner/multi.go index ab23ccd13a..1b5fc14bbc 100644 --- a/planner/multi.go +++ b/planner/multi.go @@ -234,10 +234,6 @@ func (s *selectNode) addSubPlan(fieldIndex int, newPlan planNode) error { // we already have an existing parallelNode as our source case *parallelNode: switch newPlan.(type) { - // easy, just append, since append doest need any internal relaced scannode - case *dagScanNode: - sourceNode.addChild(fieldIndex, newPlan) - // We have a internal multiscanNode on our MultiNode case *scanNode, *typeIndexJoin: // replace our new node internal scanNode with our existing multiscanner @@ -245,11 +241,9 @@ func (s *selectNode) addSubPlan(fieldIndex int, newPlan planNode) error { return err } sourceNode.multiscan.addReader() - // add our newly updated plan to the multinode - sourceNode.addChild(fieldIndex, newPlan) - default: - return client.NewErrUnhandledType("sub plan", newPlan) } + + sourceNode.addChild(fieldIndex, newPlan) } return nil }