[ 
https://issues.apache.org/jira/browse/BEAM-13052?focusedWorklogId=672831&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-672831
 ]

ASF GitHub Bot logged work on BEAM-13052:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Nov/21 20:02
            Start Date: 01/Nov/21 20:02
    Worklog Time Spent: 10m 
      Work Description: dpcollins-google commented on a change in pull request 
#15817:
URL: https://github.com/apache/beam/pull/15817#discussion_r740493150



##########
File path: sdks/python/apache_beam/coders/coders.py
##########
@@ -1014,6 +1016,42 @@ def as_deterministic_coder(self, step_label, 
error_message=None):
     return self
 
 
+class ProtoPlusCoder(FastCoder):
+  """A Coder for Google Protocol Buffers wrapped using the proto-plus library.
+
+  ProtoPlusCoder is registered in the global CoderRegistry as the default coder
+  for any proto.Message object.
+  """
+  def __init__(self, proto_plus_message_type):
+    # type: (Type[proto.Message]) -> None
+    self.proto_plus_message_type = proto_plus_message_type
+
+  def _create_impl(self):
+    return coder_impl.ProtoPlusCoderImpl(self.proto_plus_message_type)
+
+  def is_deterministic(self):
+    return True
+
+  def __eq__(self, other):
+    return (
+        type(self) == type(other) and
+        self.proto_plus_message_type == other.proto_plus_message_type)
+
+  def __hash__(self):
+    return hash(self.proto_plus_message_type)
+
+  @classmethod
+  def from_type_hint(cls, typehint, unused_registry):
+    if issubclass(typehint, proto.Message):

Review comment:
       Yes. Currently they fall back to picklecoder and fail to serialize the 
state.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 672831)
    Time Spent: 3h 20m  (was: 3h 10m)

> Pub/Sub Lite support for Python SDK
> -----------------------------------
>
>                 Key: BEAM-13052
>                 URL: https://issues.apache.org/jira/browse/BEAM-13052
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-py-gcp
>            Reporter: Chamikara Madhusanka Jayalath
>            Assignee: Daniel Collins
>            Priority: P2
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> Potentially we can make existing Java source/sink available to Python as 
> cross-language transforms.
>  
> cc: [~dpcollins-google]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to