private static ExprNodeDesc foldExpr(ExprNodeDesc desc, Map<ColumnInfo, ExprNodeDesc> constants,
      ConstantPropagateProcCtx cppCtx, Operator<? extends Serializable> op, int tag,
      boolean propagate) throws UDFArgumentException {
    if (cppCtx.getConstantPropagateOption() == ConstantPropagateOption.SHORTCUT) {
      return foldExprShortcut(desc, constants, cppCtx, op, tag, propagate);
    }
    return foldExprFull(desc, constants, cppCtx, op, tag, propagate);
  }
Fold input expression desc.

@param desc folding expression
@param constants current propagated constant map
@param cppCtx
@param op processing operator
@param propagate if true, assignment expressions will be added to constants.
@return fold expression
@throws UDFArgumentException
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java