[ 
https://issues.apache.org/jira/browse/FLINK-11951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jingsong Lee closed FLINK-11951.
--------------------------------
    Resolution: Invalid

> Enhance UserDefinedFunction interface to allow more user defined types
> ----------------------------------------------------------------------
>
>                 Key: FLINK-11951
>                 URL: https://issues.apache.org/jira/browse/FLINK-11951
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>            Reporter: Jingsong Lee
>            Assignee: Jingsong Lee
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 1.Allow UDF & UDTF to access constant parameter values at getReturnType, see 
> similar feature in hive: 
> [https://hive.apache.org/javadocs/r2.2.0/api/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.html#initializeAndFoldConstants-org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector:A-]
> {code:java}
> /**
>  * The input arguments are the input arguments which are passed to the eval() 
> method.
>  * Only the literal arguments (constant values) are passed to the 
> [[getResultType()]] method.
>  * If non-literal arguments appear, it will pass nulls instead.
>  *
>  * @param arguments arguments of a function call (only literal arguments
>  *                  are passed, nulls for non-literal ones)
>  * @param argTypes The classes of the arguments of the called eval() method.
>  * @return TypeInformation of result type or null if Flink should determine 
> the type
>  */
> public TypeInformation<?> getResultType(Object[] arguments, Class<?>[] 
> argTypes){code}
> 2.Allow AggregateFunction to decide its user define inputs types with 
> argClasses.
> {code:java}
> /**
>  * Returns the result type of the user defined inputs with a given signature.
>  */
> public TypeInformation[] getUserDefinedInputTypes(Class[] argTypes)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to