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 a 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);
    }
@Test
    public void testSplit() throws Exception {
        Object[] constantArgs = new Object[] {null};

        DataType[] dataTypes = new DataType[] {DataTypes.STRING()};

        HiveGenericUDTF udf = init(TestSplitUDTF.class, constantArgs, dataTypes);

        udf.eval("1,2,3,5");

        assertThat(collector.result)
                .isEqualTo(Arrays.asList(Row.of("1"), Row.of("2"), Row.of("3"), Row.of("5")));
    }