@Override
public ObjectInspector initialize(ObjectInspector[] arguments)
throws UDFArgumentException {
if (arguments.length != 1) {
throw new UDFArgumentLengthException(
"The function SIZE only accepts 1 argument.");
}
Category category = arguments[0].getCategory();
String typeName = arguments[0].getTypeName();
if (category != Category.MAP && category != Category.LIST