You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/04/15 00:12:46 UTC

[GitHub] [beam] pabloem commented on a change in pull request #11270: [BEAM-9639][BEAM-9608] Improvements for FnApiRunner

pabloem commented on a change in pull request #11270: [BEAM-9639][BEAM-9608] Improvements for FnApiRunner
URL: https://github.com/apache/beam/pull/11270#discussion_r408507558
 
 

 ##########
 File path: sdks/python/apache_beam/runners/portability/fn_api_runner/translations.py
 ##########
 @@ -149,15 +155,26 @@ def no_overlap(a, b):
     return (
         not consumer.forced_root and not self in consumer.must_follow and
         not self.is_runner_urn(context) and
-        not consumer.is_runner_urn(context) and
-        no_overlap(self.downstream_side_inputs, consumer.side_inputs()))
+        not consumer.is_runner_urn(context) and no_overlap(
+            set(self.downstream_side_inputs.keys()),
+            {i
+             for i, _, _ in consumer.side_inputs()}))
+
+  def _fuse_downstream_side_inputs(self, other):
+    res = dict(self.downstream_side_inputs)
+    for si, other_si_ids in other.downstream_side_inputs.items():
+      if si in res:
+        res[si] = union(res[si], other_si_ids)
 
 Review comment:
   woah this is a bug.
   downstream side input is a dictionary mapping to dictionaries.
   
   Dict[Output Pcollection, Dict[Side input ID, Access pattern]]
   Where Side input ID is Tuple[consumer ptransform, input index]. Added appropriate annotations, and fixed the bug.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services