protected void vectorForward(VectorizedRowBatch batch)
      throws HiveException {

    if (getDone()) {
      return;
    }

    // Data structures to store original values
    final int size = batch.size;
    runTimeNumRows += size;
    final boolean selectedInUse = batch.selectedInUse;
    final boolean saveState = (selectedInUse && multiChildren);
    if (saveState) {
      System.arraycopy(batch.selected, 0, selected, 0, size);
    }

    final int childSize = childOperatorsArray.length;
    if (childSize == 1) {
      childOperatorsArray[0].process(batch, childOperatorsTag[0]);
      // if that single child is done, this operator is also done
      if (childOperatorsArray[0].getDone()){
        setDone(true);
      }
    } else {
      int childrenDone = 0;
      for (int i = 0; i < childOperatorsArray.length; i++) {
        Operator<? extends OperatorDesc> o = childOperatorsArray[i];
        if (o.getDone()) {
          childrenDone++;
        } else {
          o.process(batch, childOperatorsTag[i]);

          // Restore original values
          batch.size = size;
          batch.selectedInUse = selectedInUse;
          if (saveState) {
            System.arraycopy(selected, 0, batch.selected, 0, size);
          }
        }
      }
      // if all children are done, this operator is also done
      if (childrenDone != 0 && childrenDone == childOperatorsArray.length) {
        setDone(true);
      }
    }
  }
Replace one parent with another at the same position. Chilren of the new
parent are not updated

@param parent
         the old parent
@param newParent
         the new parent
ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java