public static boolean isIntegerType(ExprNodeDesc expr) {
    TypeInfo typeInfo = expr.getTypeInfo();
    if (typeInfo.getCategory() == ObjectInspector.Category.PRIMITIVE) {
      PrimitiveObjectInspector.PrimitiveCategory primitiveCategory = ((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory();
      if(primitiveCategory == PrimitiveCategory.INT
        || primitiveCategory == PrimitiveCategory.SHORT
          || primitiveCategory == PrimitiveCategory.BYTE
        || primitiveCategory == PrimitiveCategory.LONG){
        return true;
      }
    }
    return false;
  }
Checks whether the keys of a child operator are a prefix of the keys of a
parent operator.
@param childKeys keys of the child operator
@param parentKeys keys of the parent operator
@param childOp child operator
@param parentOp parent operator
@return true if the keys are a prefix, false otherwise
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java