[
https://issues.apache.org/jira/browse/BEAM-6523?focusedWorklogId=191003&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-191003
]
ASF GitHub Bot logged work on BEAM-6523:
----------------------------------------
Author: ASF GitHub Bot
Created on: 28/Jan/19 14:11
Start Date: 28/Jan/19 14:11
Worklog Time Spent: 10m
Work Description: robertwb commented on pull request #7646: [BEAM-6523]
Add transcoding extension for Python flatten tests
URL: https://github.com/apache/beam/pull/7646#discussion_r251428611
##########
File path: sdks/python/apache_beam/runners/portability/fn_api_runner_test.py
##########
@@ -360,12 +366,20 @@ def test_reshuffle(self):
assert_that(p | beam.Create([1, 2, 3]) | beam.Reshuffle(),
equal_to([1, 2, 3]))
- def test_flatten(self):
+ def test_flatten(self, with_transcoding=True):
with self.create_pipeline() as p:
+ if with_transcoding:
+ # Additional element which does not match with the first type
+ additional = [ord('d')]
+ else:
+ additional = ['d']
res = (p | 'a' >> beam.Create(['a']),
p | 'bc' >> beam.Create(['b', 'c']),
- p | 'd' >> beam.Create(['d'])) | beam.Flatten()
- assert_that(res, equal_to(['a', 'b', 'c', 'd']))
+ p | 'd' >> beam.Create(additional)) | beam.Flatten()
+ assert_that(res,
+ equal_to(['a', 'b', 'c', ord('d')])
Review comment:
Similarly, `['a', 'b', 'c'] + additional`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 191003)
Time Spent: 20m (was: 10m)
> Support transcoding for Flatten in Flink Runner
> -----------------------------------------------
>
> Key: BEAM-6523
> URL: https://issues.apache.org/jira/browse/BEAM-6523
> Project: Beam
> Issue Type: New Feature
> Components: runner-flink
> Reporter: Maximilian Michels
> Priority: Minor
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The Beam documentation mentions that Flatten does not require coders of all
> inputs to be of the same type, as long as the result type is the same.
> However, the current implementation in the Flink Runner requires all coders
> to match.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)