beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kennknowles <...@git.apache.org>
Subject [GitHub] incubator-beam pull request #757: Use input type in coder inference for MapE...
Date Fri, 29 Jul 2016 03:44:45 GMT
GitHub user kennknowles opened a pull request:

    https://github.com/apache/incubator-beam/pull/757

    Use input type in coder inference for MapElements and FlatMapElements

    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
    
     - [ ] Make sure the PR title is formatted like:
       `[BEAM-<Jira issue #>] Description of pull request`
     - [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [ ] If this contribution is large, please file an Apache
           [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).
    
    ---
    
    It seems that PR #756 triggered some very strange serialization issues with regards to
lambda. To isolate them, I went through the conflicts and peeled this commit off the top.
Description follows:
    
    Previously, the input `TypeDescriptor` was unknown, so we would fail to infer a coder
for things like `MapElements.of(SimpleFunction<T, T>)` even if the input `PCollection`
provided a coder for `T`.
    
    Now, the input type is plumbed appropriately and the coder is inferred.
    
    This required internal changes to explicitly support good display data (tests fail with
a naive refactor). While doing this, I just added display data to `SimpleFunction` by analogy
with `DoFn`.

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

    $ git pull https://github.com/kennknowles/incubator-beam Map-FlatMap-TypeDescriptor

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

    https://github.com/apache/incubator-beam/pull/757.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 #757
    
----
commit f94dbc423038a35d1a9a031d80f177a902bceb9a
Author: Kenneth Knowles <klk@google.com>
Date:   2016-07-29T01:47:04Z

    Use input type in coder inference for MapElements and FlatMapElements
    
    Previously, the input TypeDescriptor was unknown, so we would fail
    to infer a coder for things like MapElements.of(SimpleFunction<T, T>)
    even if the input PCollection provided a coder for T.
    
    Now, the input type is plumbed appropriately and the coder is inferred.
    
    This required internal changes to explicitly support good display data.
    While doing this, I just added display data to SimpleFunction by analogy
    with DoFn.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message