boyuanzz commented on a change in pull request #12806:
URL: https://github.com/apache/beam/pull/12806#discussion_r489617682
##########
File path: sdks/python/apache_beam/io/gcp/pubsub.py
##########
@@ -299,12 +299,7 @@ def to_proto_str(element):
return element._to_proto_str()
def expand(self, pcoll):
- if self.with_attributes:
- pcoll = pcoll | 'ToProtobuf' >> Map(self.to_proto_str)
-
- # Without attributes, message data is written as-is. With attributes,
- # message data + attributes are passed as a serialized protobuf string (see
- # ``PubsubMessage._to_proto_str`` for exact protobuf message type).
+ pcoll = pcoll | 'ToProtobuf' >> Map(self.to_proto_str)
Review comment:
I just realized that `with_attributes` means different type of input.
Changed the expansion with respect to `with_attributes`.
----------------------------------------------------------------
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]