You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Timo Walther (JIRA)" <ji...@apache.org> on 2018/06/04 07:29:00 UTC
[jira] [Commented] (FLINK-9294) Improve type inference for UDFs
with composite parameter or result type
[ https://issues.apache.org/jira/browse/FLINK-9294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16499844#comment-16499844 ]
Timo Walther commented on FLINK-9294:
-------------------------------------
[~walterddr] I think you mean {{String[]}} instead of {{List<String>}} if the result should be an {{ObjectArrayTypeInfo}}, right?
> Improve type inference for UDFs with composite parameter or result type
> ------------------------------------------------------------------------
>
> Key: FLINK-9294
> URL: https://issues.apache.org/jira/browse/FLINK-9294
> Project: Flink
> Issue Type: Sub-task
> Components: Table API & SQL
> Reporter: Rong Rong
> Assignee: Rong Rong
> Priority: Major
>
> Most of the UDF function signatures that includes composite types such as *{{MAP}}*, *{{ARRAY}}*, etc would require user to override *{{getParameterType}}* or *{{getResultType}}* method explicitly.
> It should be able to resolve the composite type based on the function signature, such as:
> {code:java}
> public List<String> eval(Map<String, Integer> mapArg) {
> //...
> }
> {code}
> should automatically resolve that:
> - *{{ObjectArrayTypeInfo<BasicTypeInfo.STRING>}}* to be the result type.
> - *{{MapTypeInfo<BasicTypeInfo.STRING, BasicTypeInfo.INTEGER>}}* to be the parameter type.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)