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

Timo Walther commented on FLINK-9565:
-------------------------------------

We don't need a new eval function for it. I would prefer option #3:

{code}
public class MyScalarFunc extends ScalarFunction {

    @Override
    public boolean isParallelizable() {
        return true;
    }

    public Double eval(Double d) {
        // expensive logic
    }
}
{code}

This would integrate nicely with the existing design. Because 
{{ScalarFunction}} also has a {{isDeterministic}} method that can be 
overwritten.

> Evaluating scalar UDFs in parallel
> ----------------------------------
>
>                 Key: FLINK-9565
>                 URL: https://issues.apache.org/jira/browse/FLINK-9565
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>    Affects Versions: 1.4.2
>            Reporter: yinhua.dai
>            Priority: Major
>
> As per 
> [https://stackoverflow.com/questions/50790023/does-flink-sql-support-to-run-projections-in-parallel,]
>  scalar UDF in the same SQL is always evaluated sequentially even when those 
> UDF are irrelevant, it may increase latency when the UDF is time consuming 
> function.
> It would be great if Flink SQL can support to run those UDF in parallel to 
> reduce calculation latency.
>  
> cc [~fhueske]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to