Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
Currently overload is not supported in user defined function and given the following UDF
class Func21 extends ScalarFunction { def eval(p: People): String = { p.name } def eval(p: Student): String = { "student#" + p.name } } class People(val name: String) class Student(name: String) extends People(name) class GraduatedStudent(name: String) extends Student(name)
Queries such as the following will compile failed with error msg "Found multiple 'eval' methods which match the signature."
val udf = new Func21 val table = ... table.select(udf(new GraduatedStudent("test")))
That's because overload is not supported in user defined function currently. I think it will make sense to support overload following the java language specification in section 15.2.
Attachments
Issue Links
- relates to
-
FLINK-13580 Add overload support for user defined function to blink-planner
- Resolved
- links to