chamikaramj commented on a change in pull request #13741:
URL: https://github.com/apache/beam/pull/13741#discussion_r556686296
##########
File path: sdks/python/apache_beam/transforms/external.py
##########
@@ -443,7 +443,8 @@ def _normalize(coder_proto):
self._external_namespace), (id, self._external_namespace)
new_proto = beam_runner_api_pb2.PTransform(
unique_name=proto.unique_name,
- spec=proto.spec,
+ # If URN is not set this is an empty spec.
+ spec=proto.spec if proto.spec.urn else None,
Review comment:
Unfortunately with Proto3 you cannot really check whether a field is set
or not it seems and Python will give a non zero byte value even for an empty
"spec" field. You can just check the values of the fields.
----------------------------------------------------------------
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]