[
https://issues.apache.org/jira/browse/BEAM-12284?focusedWorklogId=598923&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598923
]
ASF GitHub Bot logged work on BEAM-12284:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 18/May/21 23:06
Start Date: 18/May/21 23:06
Worklog Time Spent: 10m
Work Description: dmkozh commented on a change in pull request #14834:
URL: https://github.com/apache/beam/pull/14834#discussion_r634808329
##########
File path: sdks/python/apache_beam/transforms/create_test.py
##########
@@ -121,6 +123,43 @@ def test_create_source_progress(self):
self.assertEqual(expected_split_points_report, split_points_report)
+ def test_create_uses_coder_for_pickling(self):
+ coders.registry.register_coder(_Unpicklable, _UnpicklableCoder)
+ create = Create([_Unpicklable(1), _Unpicklable(2), _Unpicklable(3)])
+ unpickled_create = pickler.loads(pickler.dumps(create))
+ self.assertEqual(
+ sorted(create.values, key=lambda v: v.value),
+ sorted(unpickled_create.values, key=lambda v: v.value))
+
+ with self.assertRaises(NotImplementedError):
+ create_unpicklable = Create([_Unpicklable(1), 2])
Review comment:
Unfortunately there is no special 'UnionCoder' as of now, so this falls
back to FastPrimitivesCoder. Added a comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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: 598923)
Time Spent: 1.5h (was: 1h 20m)
> beam.Create should respect element coder during pickling
> --------------------------------------------------------
>
> Key: BEAM-12284
> URL: https://issues.apache.org/jira/browse/BEAM-12284
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Reporter: Dmytro Kozhevin
> Assignee: Dmytro Kozhevin
> Priority: P2
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> beam.Create stores values to create as a field. If the values can't be
> pickled, then the transform itself can't be pickled and transferred for
> remote execution. Instead it should encode/decode elements using the element
> coders during pickling/unpickling.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)