class HiveGenericUDTF extends TableFunction<Row> implements HiveFunction {

	public void eval(Object... args) throws HiveException {

		// When the parameter is (Integer, Array[Double]), Flink calls udf.eval(Integer, Array[Double]), which is not a problem.
		// But when the parameter is an single array, Flink calls udf.eval(Array[Double]),
		// at this point java's var-args will cast Array[Double] to Array[Object] and let it be
		// Object... args, So we need wrap it.
		if (isArgsSingleArray) {
			args = new Object[] {args};
		}

		checkArgument(args.length == conversions.length);

		if (!allIdentityConverter) {
			for (int i = 0; i < args.length; i++) {
				args[i] = conversions[i].toHiveObject(args[i]);
			}
		}

		function.process(args);
	}

	public  HiveGenericUDTF(HiveFunctionWrapper<GenericUDTF> hiveFunctionWrapper);

}