Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions sdks/python/apache_beam/runners/worker/bundle_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,3 +610,17 @@ def _create_combine_phase_operation(
factory.state_sampler),
transform_proto.unique_name,
consumers)


@BeamTransformFactory.register_urn(urns.FLATTEN_TRANSFORM, None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did "urns.FLATTEN_TRANSFORM" need to be updated to match Java?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, right now it differs from the one being used in Java. Since PR #4310 is being worked on to solve the discrepancies, we can wait to merge this PR until after that one is merged, or I can just make a new PR later to fix the URN. What do you think would be better? I'm leaning towards the second option.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's get this one in and hopefully #4310 will be merged soon.

def create(factory, transform_id, transform_proto, unused_parameter, consumers):
return factory.augment_oldstyle_op(
operations.create_operation(
transform_proto.unique_name,
operation_specs.WorkerFlatten(
None,
[factory.get_only_output_coder(transform_proto)]),
factory.counter_factory,
factory.state_sampler),
transform_proto.unique_name,
consumers)