@Override
  public void walk(Node nd) throws SemanticException {
    if (excludeNodes.contains(nd.getClass())) {
      return;
    }
    opStack.push(nd);
    dispatch(nd, opStack);

    // The rule has been applied, we bail out
    if (retMap.get(nd) != null) {
      opStack.pop();
      return;
    }

    // move all the children to the front of queue
    if (nd.getChildren() != null) {
      for (Node n : nd.getChildren()) {
        walk(n);
      }
    }

    opStack.pop();
  }
Walk the current operator and its descendants.

@param nd
         current operator in the graph
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/lib/PreOrderOnceWalker.java