@Override
  protected void walk(Node nd) throws SemanticException {
    List<? extends Node> children = nd.getChildren();

    // maintain the stack of operators encountered
    opStack.push(nd);
    Boolean skip = dispatchAndReturn(nd, opStack);

    // save some positional state
    Operator<? extends OperatorDesc> currentRoot = ctx.currentRootOperator;
    Operator<? extends OperatorDesc> parentOfRoot = ctx.parentOfRoot;
    List<UnionOperator> currentUnionOperators = ctx.currentUnionOperators;
    BaseWork preceedingWork = ctx.preceedingWork;

    if (skip == null || !skip) {
      // move all the children to the front of queue
      for (Node ch : children) {

        // and restore the state before walking each child
        ctx.currentRootOperator = currentRoot;
        ctx.parentOfRoot = parentOfRoot;
        ctx.preceedingWork = preceedingWork;
        ctx.currentUnionOperators = new ArrayList<>();
        ctx.currentUnionOperators.addAll(currentUnionOperators);

        walk(ch);
      }
    }

    // done with this operator
    opStack.pop();
  }
Walk the given operator.

@param nd operator being walked
ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezWorkWalker.java