beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEAM-1418) MapElements and FlatMapElements should comply with PTransform style guide
Date Wed, 29 Mar 2017 21:01:41 GMT

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

ASF GitHub Bot commented on BEAM-1418:
--------------------------------------

GitHub user jkff opened a pull request:

    https://github.com/apache/beam/pull/2363

    [BEAM-1418] MapElements and FlatMapElements should comply with PTransform style guide

    For both of these classes, we change (Flat)MapElements.via(fn).withOutputType(td) to (Flat)MapElements.into(td).via(fn),
which is both shorter and allows getting rid of the ugly intermediate and publicly-visible
class MissingOutputTypeDescriptor.
    
    R: @bjchambers 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jkff/incubator-beam map-style

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/beam/pull/2363.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2363
    
----
commit c52cddfaf15eb1d5df65bdcbdfb4ee6f167fe0f2
Author: Eugene Kirpichov <kirpichov@google.com>
Date:   2017-03-29T20:42:29Z

    Removes MapElements.MissingOutputTypeDescriptor
    
    This comes from changing MapElements.via(fn).withOutputType(td)
    to MapElements.into(td).via(fn) which is also shorter.

commit 6ae80473f9924fe43c18e02f4a139f6421306c7f
Author: Eugene Kirpichov <kirpichov@google.com>
Date:   2017-03-29T20:56:00Z

    Removes FlatMapElements.MissingOutputTypeDescriptor
    
    This comes from changing FlatMapElements.via(fn).withOutputType(td)
    to FlatMapElements.into(td).via(fn) which is also shorter.

----


> MapElements and FlatMapElements should comply with PTransform style guide
> -------------------------------------------------------------------------
>
>                 Key: BEAM-1418
>                 URL: https://issues.apache.org/jira/browse/BEAM-1418
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Eugene Kirpichov
>              Labels: backward-incompatible, starter
>             Fix For: First stable release
>
>
> Type structure of these classes can be improved by slightly changing the API:
> FlatMapElements.into(TypeDescriptor).via(as usual).
> Likewise for MapElements. This allows getting rid of the awkward MissingOutputTypeDescriptor
intermediate class.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message