private VectorExpression getIdentityExpression(List<ExprNodeDesc> childExprList)
      throws HiveException {

    if (childExprList.size() != 1) {
      return null;
    }
    ExprNodeDesc childExpr = childExprList.get(0);
    if (!(childExpr instanceof ExprNodeColumnDesc)) {

      // Some vector operators like VectorSelectOperator optimize out IdentityExpression out of
      // their vector expression list and don't evaluate the children, so just return the
      // child expression here instead of IdentityExpression.
      return getVectorExpression(childExpr);
    }

    int identityCol;
    TypeInfo identityTypeInfo;
    DataTypePhysicalVariation identityDataTypePhysicalVariation;

    ExprNodeColumnDesc colDesc = (ExprNodeColumnDesc) childExpr;
    identityCol = getInputColumnIndex(colDesc.getColumn());
    identityTypeInfo = colDesc.getTypeInfo();

    identityDataTypePhysicalVariation = getDataTypePhysicalVariation(identityCol);

    VectorExpression ve = new IdentityExpression(identityCol);

    ve.setInputTypeInfos(identityTypeInfo);
    ve.setInputDataTypePhysicalVariations(identityDataTypePhysicalVariation);

    ve.setOutputTypeInfo(identityTypeInfo);
    ve.setOutputDataTypePhysicalVariation(identityDataTypePhysicalVariation);

    return ve;
  }
Used as a fast path for operations that don't modify their input, like unary +
and casting boolean to long. IdentityExpression and its children are always
projections.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java