You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Weijie Guo (Jira)" <ji...@apache.org> on 2024/09/03 07:02:00 UTC
[jira] [Commented] (FLINK-14658) Drop ".returns()" for TypeInformation in the DataStream API
[ https://issues.apache.org/jira/browse/FLINK-14658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17878732#comment-17878732 ]
Weijie Guo commented on FLINK-14658:
------------------------------------
Move to 3.0 as we didn't deprecate it before.
> Drop ".returns()" for TypeInformation in the DataStream API
> -----------------------------------------------------------
>
> Key: FLINK-14658
> URL: https://issues.apache.org/jira/browse/FLINK-14658
> Project: Flink
> Issue Type: Sub-task
> Components: API / DataStream
> Reporter: Stephan Ewen
> Priority: Major
> Fix For: 3.0.0
>
>
> The pattern to use {{.map(function).returns(type)}} to override the automatically extracted type is flawed and should not be used.
> Instead, each transformation method should be overloaded to have a variant that accepts the return type as the second argument, if in case we want to override the type extractor.
> See [FLINK-14380] for good example of why the {{.returns(type)}} pattern is broken.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)