chamikaramj commented on a change in pull request #11185: [BEAM-8019] Updates 
Python SDK to handle remote SDK coders and preserve tags added by remote SDKs 
and propagate restriction coders.
URL: https://github.com/apache/beam/pull/11185#discussion_r399896870
 
 

 ##########
 File path: sdks/python/apache_beam/pipeline.py
 ##########
 @@ -1128,29 +1136,67 @@ def from_runner_api(proto,  # type: 
beam_runner_api_pb2.PTransform
                       context  # type: PipelineContext
                      ):
     # type: (...) -> AppliedPTransform
-    def is_side_input(tag):
+    def is_python_side_input(tag):
       # type: (str) -> bool
       # As per named_inputs() above.
-      return tag.startswith('side')
+      return re.match(SIDE_INPUT_REGEX, tag)
 
 Review comment:
   I changed the Python side input prefix from 'side' to 'python_side_input' 
(SIDE_INPUT_PREFIX) to make this tighter. This is still not 100% fail safe (an 
external SDK might still start side input tags with 'python_side_input') but I 
don't think this will be an issue in practice.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to