File tree 2 files changed +4
-0
lines changed
sdks/python/apache_beam/yaml
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -814,6 +814,9 @@ def split(element):
814
814
mapping_transform = mapping_transform .with_outputs (* output_set )
815
815
splits = pcoll | mapping_transform .with_input_types (T ).with_output_types (T )
816
816
result = {out : getattr (splits , out ) for out in output_set }
817
+ for tag , out in result .items ():
818
+ if tag != error_output :
819
+ out .element_type = pcoll .element_type
817
820
if error_output :
818
821
result [error_output ] = result [error_output ] | map_errors_to_standard_format (
819
822
pcoll .element_type )
Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ def test_partition(self):
212
212
language: python
213
213
outputs: [even, odd]
214
214
''' )
215
+ self .assertEqual (result ['even' ].element_type , elements .element_type )
215
216
assert_that (
216
217
result ['even' ] | beam .Map (lambda x : x .element ),
217
218
equal_to (['banana' , 'orange' ]),
You can’t perform that action at this time.
0 commit comments