private void setRoot(Node nd) {
    ctx.currentRootOperator = (Operator<? extends OperatorDesc>) nd;
    ctx.preceedingWork = null;
    ctx.parentOfRoot = null;
    ctx.currentUnionOperators = new ArrayList<>();
  }
constructor of the walker - the dispatcher is passed.

@param disp the dispatcher to be called for each node visited
@param ctx the context where we'll set the current root operator
ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezWorkWalker.java