docs: private void extractSubqueries(AbstractPlanNode node)  throws Exception {
          assert(node != null);
          Collection<AbstractExpression> subexprs = node.findAllSubquerySubexpressions();
          for (AbstractExpression nextexpr : subexprs) {
              assert(nextexpr instanceof AbstractSubqueryExpression);
              AbstractSubqueryExpression subqueryExpr = (AbstractSubqueryExpression) nextexpr;
              int stmtId = subqueryExpr.getSubqueryId();
              List<AbstractPlanNode> planNodes = new ArrayList<>();
              assert(!m_planNodesListMap.containsKey(stmtId));
              m_planNodesListMap.put(stmtId, planNodes);
              constructTree(planNodes, subqueryExpr.getSubqueryNode());
          }
          if (node instanceof SeqScanPlanNode) {
              // If this is a CTE scan, then we need to attach the
              // base and recursive plans.  Both go into new elements
              // of the plan list.
              SeqScanPlanNode seqScanNode = (SeqScanPlanNode)node;
              StmtCommonTableScan scan = seqScanNode.getCommonTableScan();
              if (scan != null) {
                  List<AbstractPlanNode> planNodes = new ArrayList<>();
                  CompiledPlan basePlanNode = scan.getBestCostBasePlan();
                  Integer baseStmtId = scan.getBaseStmtId();
                  if ( ! m_planNodesListMap.containsKey(baseStmtId.intValue())) {
                      // We may see the same scan several times in the tree.  That's
                      // ok, but only try to put the scan in the lists once.
                      m_planNodesListMap.put(baseStmtId, planNodes);
                      constructTree(planNodes, basePlanNode.rootPlanGraph);
                      if (scan.isRecursiveCTE()) {
                          CompiledPlan recursivePlanNode = scan.getBestCostRecursivePlan();
                          Integer recursiveStmtId = scan.getRecursiveStmtId();
                          // We should not have added this yet.  We know
                          // we didn't add the base plan.  If we added a statement id
                          // which is the same as that of the
                          // recursive plan without the base plan that would
                          // be evidence of confusion.
                          assert((recursiveStmtId != null) && !m_planNodesListMap.containsKey(recursiveStmtId));
                          // Need a new list of Plan Nodes for the recursive case, as it's
                          // a new plan.
                          planNodes = new ArrayList<>();
                          m_planNodesListMap.put(recursiveStmtId, planNodes);
                          constructTree(planNodes, recursivePlanNode.rootPlanGraph);
                      }
                  }
              }
          }
      }