From 625ab1483d8c5ba8a6de68841b32534b76767807 Mon Sep 17 00:00:00 2001 From: Andrew Sisley Date: Thu, 8 Feb 2024 17:31:57 -0500 Subject: [PATCH] Remove Source misdirection and cast --- planner/multi.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/planner/multi.go b/planner/multi.go index bcf7ca729f..ab23ccd13a 100644 --- a/planner/multi.go +++ b/planner/multi.go @@ -240,16 +240,11 @@ func (s *selectNode) addSubPlan(fieldIndex int, newPlan planNode) error { // We have a internal multiscanNode on our MultiNode case *scanNode, *typeIndexJoin: - multiscan, sourceIsMultiscan := sourceNode.Source().(*multiScanNode) - if !sourceIsMultiscan { - return client.NewErrUnexpectedType[*multiScanNode]("mergeNode", sourceNode.Source()) - } - // replace our new node internal scanNode with our existing multiscanner - if err := s.planner.walkAndReplacePlan(newPlan, multiscan.Source(), multiscan); err != nil { + if err := s.planner.walkAndReplacePlan(newPlan, sourceNode.multiscan.Source(), sourceNode.multiscan); err != nil { return err } - multiscan.addReader() + sourceNode.multiscan.addReader() // add our newly updated plan to the multinode sourceNode.addChild(fieldIndex, newPlan) default: