use of org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException in project hive by apache.
the class TestGenericUDFFactorial method testWrongInputType.
public void testWrongInputType() throws HiveException {
@SuppressWarnings("resource") GenericUDFFactorial udf = new GenericUDFFactorial();
ObjectInspector valueOI0 = PrimitiveObjectInspectorFactory.writableDoubleObjectInspector;
ObjectInspector[] arguments = { valueOI0 };
try {
udf.initialize(arguments);
assertTrue("GenericUDFFactorial.initialize() shold throw UDFArgumentTypeException", false);
} catch (UDFArgumentTypeException e) {
// UDFArgumentTypeException is expected
}
}
Aggregations