@Override
    @SuppressWarnings("unchecked")
    public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx ctx, Object... nodeOutputs)
        throws SemanticException {
      ConstantPropagateProcCtx cppCtx = (ConstantPropagateProcCtx) ctx;
      Operator<? extends Serializable> op = (Operator<? extends Serializable>) nd;
      Map<ColumnInfo, ExprNodeDesc> constants = cppCtx.getPropagatedConstants(op);
      cppCtx.getOpToConstantExprs().put(op, constants);
      RowSchema rs = op.getSchema();
      if (op.getColumnExprMap() != null && rs != null) {
        for (ColumnInfo colInfo : rs.getSignature()) {
          if (!VirtualColumn.isVirtualColumnBasedOnAlias(colInfo)) {
            ExprNodeDesc expr = op.getColumnExprMap().get(colInfo.getInternalName());
            if (expr instanceof ExprNodeConstantDesc) {
              constants.put(colInfo, expr);
            }
          }
        }
      }
      if (constants.isEmpty()) {
        return null;
      }
      foldOperator(op, cppCtx);
      return null;
    }
The Default Node Processor for Constant Propagation.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java