[
https://issues.apache.org/jira/browse/BEAM-1956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15969521#comment-15969521
]
ASF GitHub Bot commented on BEAM-1956:
--------------------------------------
GitHub user vikkyrk opened a pull request:
https://github.com/apache/beam/pull/2543
[BEAM-1956] Modify types for input PCollections of Flatten transform
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.pdf).
---
Modify types for input PCollections of Flatten transform to that of the
output PCollection
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vikkyrk/incubator-beam py_flatten_visitor
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/2543.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 #2543
----
commit e3ac1f4d3298b2e32463b6b132dda89706a6bc58
Author: Vikas Kedigehalli <[email protected]>
Date: 2017-04-14T20:53:13Z
Modifying types for input PCollectios of Flatten transform with that of the
output PCollection
----
> Flatten operation should respect input type hints.
> --------------------------------------------------
>
> Key: BEAM-1956
> URL: https://issues.apache.org/jira/browse/BEAM-1956
> Project: Beam
> Issue Type: Bug
> Components: sdk-py
> Reporter: Vikas Kedigehalli
> Assignee: Vikas Kedigehalli
> Fix For: First stable release
>
>
> Input type hints are currently not respected by the Flatten operation and
> instead `Any` type is chosen as a fallback. This could lead to using a pickle
> coder even if there was a custom coder type hint provided for input
> PCollections.
> Also, this could lead to undesirable results, particularly, when a Flatten
> operation is followed by a GroupByKey operation which requires the key coder
> to be deterministic. Even if the user provides deterministic coder type hints
> to their PCollections, defaulting to Any would result in using the pickle
> coder (non-deterministic). As a result of this, CoGroupByKey is broken in
> such scenarios where input PCollection coder is deterministic for the type
> while pickle coder is not.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)