[ 
https://issues.apache.org/jira/browse/FLINK-6457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16057572#comment-16057572
 ] 

Fabian Hueske commented on FLINK-6457:
--------------------------------------

I don't understand which problem this issue aims to resolve. All removed 
methods are implemented methods of abstract classes that users do not need to 
override. Removing this methods and calling them via reflection has a couple of 
issues:

- Users need to get the signature exactly right. When overriding existing 
methods, users have IDE and compiler support.
- Calling methods via reflection is always a bit brittle in my opinion.

All UDF methods that are called via reflection cannot be abstract methods 
because parameter and return types must be flexible. So, calling via reflection 
is justified in these cases. However, methods with a fixed signature can be 
directly called, IMO.

Can you explain why these changes are necessary?

Thank you, Fabian.

> Clean up ScalarFunction and TableFunction interface
> ---------------------------------------------------
>
>                 Key: FLINK-6457
>                 URL: https://issues.apache.org/jira/browse/FLINK-6457
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>            Reporter: Ruidong Li
>            Assignee: Ruidong Li
>
> Motivation:
> Some methods in ScalarFunction and TableFunction are unnecessary, e.g 
> toString() and getResultType in ScalarFunction
> this issue intend to clear the interface.
> Goal:
>  only methods related to `Collector` will remain in TableFunction interface, 
> and ScalarFunction interface shall have no methods , user can choose whether 
> to implement the `getResultType` method, which will be called by reflection, 
> and the Flink document will have instructions for user.
> Future:
> There should be some Annotations for user to implement methods like `@Eval` 
> for eval method, it be will in the next issue



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to