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/09/16 06:43:14 UTC

[GitHub] [beam] chamikaramj commented on a change in pull request #12806: [BEAM-10869] Make WriteToPubsub output serialized PubsubMessage proto bytes when using runner v2

chamikaramj commented on a change in pull request #12806:
URL: https://github.com/apache/beam/pull/12806#discussion_r489199076



##########
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:
       Update the pydoc for 'with_attributes' property above ?




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