static void validateIntegralParameter()

in src/main/java/org/apache/datasketches/hive/hll/ObjectInspectorValidator.java [47:62]


  static void validateIntegralParameter(final ObjectInspector inspector, final int index)
      throws UDFArgumentTypeException {
    validateCategoryPrimitive(inspector, index);
    final PrimitiveObjectInspector primitiveInspector = (PrimitiveObjectInspector) inspector;
    switch (primitiveInspector.getPrimitiveCategory()) {
    case BYTE:
    case SHORT:
    case INT:
    case LONG:
      break;
    // all other types are invalid
    default:
      throw new UDFArgumentTypeException(index, "Only integral type parameters are expected but "
          + primitiveInspector.getPrimitiveCategory().name() + " was passed as parameter " + (index + 1));
    }
  }