Affects Version/s: None
Fix Version/s: 1.3.0
In some cases, UDF/UDTF should support variable types and variable arguments. Many UDF/UDTF developers wish to make the # of arguments and types flexible to users. They try to make their functions flexible.
Thus, we should support the following styles of UDF/UDTFs.
for example 1, in Java
for example 2, in Scala
If we modify the code in UserDefinedFunctionUtils.getSignature() and make both signatures pass. The first example will work normally. However, the second example will raise an exception.
The reason is that Scala will do a sugary modification to the signature of the method. The mothod
in the class file.
The code generation has been done in Java. If we use java style
to call the Scala method, it will raise the above exception.
However, I can't always restrict users to use Java to write a UDF/UDTF. Any ideas in variable types and variable arguments of Scala UDF/UDTFs to prevent the compilation failure?