code: private void harmonizeCommonTableSchemas(CompiledPlan plan) {
          List<AbstractPlanNode> seqScanNodes = plan.rootPlanGraph.findAllNodesOfClass(SeqScanPlanNode.class);
          for (AbstractPlanNode planNode : seqScanNodes) {
              SeqScanPlanNode seqScanNode = (SeqScanPlanNode)planNode;
              StmtCommonTableScan scan = seqScanNode.getCommonTableScan();
              if (scan != null) {
                  scan.harmonizeOutputSchema();
              }
          }
      }
docs: Make sure that schemas in base and recursive plans
  in common table scans have identical schemas.  This
  is important because otherwise we will get data
  corruption in the EE.  We look for SeqScanPlanNodes,
  then look for a common table scan, and ask the scan
  node to harmonize its schemas.
  
  @param plan