src/main/java/org/apache/datasketches/hive/kll/ObjectInspectorValidator.java [27:44]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
final class ObjectInspectorValidator {

  static void validateCategoryPrimitive(
      final ObjectInspector inspector, final int index) throws SemanticException {
    if (inspector.getCategory() != ObjectInspector.Category.PRIMITIVE) {
      throw new UDFArgumentTypeException(index, "Primitive argument expected, but "
          + inspector.getCategory().name() + " was recieved");
    }
  }

  static void validateGivenPrimitiveCategory(final ObjectInspector inspector, final int index,
      final PrimitiveObjectInspector.PrimitiveCategory category) throws SemanticException
  {
    validateCategoryPrimitive(inspector, index);
    final PrimitiveObjectInspector primitiveInspector = (PrimitiveObjectInspector) inspector;
    if (primitiveInspector.getPrimitiveCategory() != category) {
      throw new UDFArgumentTypeException(index, category.name() + " value expected as the argument "
          + (index + 1) + " but " + primitiveInspector.getPrimitiveCategory().name() + " was received");
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/datasketches/hive/quantiles/ObjectInspectorValidator.java [27:44]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
final class ObjectInspectorValidator {

  static void validateCategoryPrimitive(
      final ObjectInspector inspector, final int index) throws SemanticException {
    if (inspector.getCategory() != ObjectInspector.Category.PRIMITIVE) {
      throw new UDFArgumentTypeException(index, "Primitive argument expected, but "
          + inspector.getCategory().name() + " was recieved");
    }
  }

  static void validateGivenPrimitiveCategory(final ObjectInspector inspector, final int index,
      final PrimitiveObjectInspector.PrimitiveCategory category) throws SemanticException
  {
    validateCategoryPrimitive(inspector, index);
    final PrimitiveObjectInspector primitiveInspector = (PrimitiveObjectInspector) inspector;
    if (primitiveInspector.getPrimitiveCategory() != category) {
      throw new UDFArgumentTypeException(index, category.name() + " value expected as the argument "
          + (index + 1) + " but " + primitiveInspector.getPrimitiveCategory().name() + " was received");
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



