You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Eugene Kirpichov (Jira)" <ji...@apache.org> on 2019/12/10 22:06:00 UTC

[jira] [Commented] (BEAM-8942) Improve support for lambdas that throw checked exceptions in various transforms

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

Eugene Kirpichov commented on BEAM-8942:
----------------------------------------

Beam Java has a few interfaces for functions - SerializableFunction (doesn't throw, takes lambdas), ProcessFunction (throws, takes lambdas), InferableFunction (throws, doesn't take lambdas).
Just having 3 interfaces is already confusing - it seems like SerializableFunction should be deleted or deprecated.

However, we should make it so that various PTransforms taking lambdas, e.g. Map/FlatMapElements.via(), FileIO.write().by() etc. can all take throwing lambdas. That might be by removing the SerializableFunction overloads or by adding new methods or any other means.

> Improve support for lambdas that throw checked exceptions in various transforms
> -------------------------------------------------------------------------------
>
>                 Key: BEAM-8942
>                 URL: https://issues.apache.org/jira/browse/BEAM-8942
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Tomo Suzuki
>            Priority: Major
>
> Ticket to followup the below:
> [~jkff] says:
> {quote}Would be nice (not in this PR) to make it easier to do MapElements.via() with throwing functions without the hassle of fn(lambda, Requirements.empty()).
> {quote}
>  
> [https://github.com/apache/beam/pull/10256/files#r356282252]
>  
>  



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