@ParameterizedTest
  @MethodSource("generateArgsWithSameCategoryNoBothPrimitive")
  public void testBaseNonEqualityUDFWithNonPrimitiveTypeArgsThrowsException(UDFArguments args) {
    List<GenericUDF> udfs = Arrays
        .asList(new GenericUDFOPGreaterThan(), new GenericUDFOPLessThan(), new GenericUDFOPEqualOrGreaterThan(),
            new GenericUDFOPEqualOrLessThan());
    for (GenericUDF udf : udfs) {
      try {
        udf.initialize(new ObjectInspector[] { args.left, args.right });
        Assertions.fail(
            udf.getUdfName() + " operator should not accept non primitive types [" + args.left.getCategory() + ","
                + args.right.getCategory() + "]");
      } catch (UDFArgumentException e) {
        boolean isValidMessage =
            e.getMessage().contains("not support MAP types") ||
            e.getMessage().contains("not support LIST types") ||
            e.getMessage().contains("not support STRUCT types") ||
            e.getMessage().contains("not support UNION types");
        Assertions.assertTrue(isValidMessage, "Unexpected message for " + udf.getUdfName());
      }
    }
  }
Tests for {@link GenericUDF#initialize(ObjectInspector[])} on the most common equality/comparison operators when 
arguments of various types are provided.

The tests cover positive and negative cases for the following operators:
<ul>
<li>{@link GenericUDFOPEqual}</li>
<li>{@link GenericUDFOPEqualNS}</li>
<li>{@link GenericUDFOPNotEqual}</li>
<li>{@link GenericUDFOPNotEqualNS}</li>
<li>{@link GenericUDFOPGreaterThan}</li>
<li>{@link GenericUDFOPEqualOrGreaterThan}</li>
<li>{@link GenericUDFOPLessThan}</li>
<li>{@link GenericUDFOPEqualOrLessThan}</li>
<li>{@link GenericUDFIn}</li>
</ul>
ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFInitializeOnCompareUDF.java