public static Dependency getExprDependency(LineageCtx lctx,
      Operator<? extends OperatorDesc> inpOp, ExprNodeDesc expr, HashMap<Node, Object> outputMap)
      throws SemanticException {

    outputMap.clear();

    // Create the walker, the rules dispatcher and the context.
    ExprProcCtx exprCtx = new ExprProcCtx(lctx, inpOp);

    // create a walker which walks the tree in a DFS manner while maintaining
    // the operator stack. The dispatcher
    // generates the plan from the operator tree

    // The dispatcher fires the processor corresponding to the closest matching
    // rule and passes the context along
    SemanticDispatcher disp = new DefaultRuleDispatcher(getDefaultExprProcessor(),
        exprRules, exprCtx);
    SemanticGraphWalker egw = new DefaultGraphWalker(disp);

    List<Node> startNodes = Collections.singletonList((Node)expr);

    egw.startWalking(startNodes, outputMap);
    return (Dependency)outputMap.get(expr);
  }
Gets the expression dependencies for the expression.

@param lctx
         The lineage context containing the input operators dependencies.
@param inpOp
         The input operator to the current operator.
@param expr
         The expression that is being processed.
@param outputMap
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/optimizer/lineage/ExprProcFactory.java