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
URL: https://github.com/apache/beam/pull/11185#discussion_r397957394
 
 

 ##########
 File path: sdks/python/apache_beam/coders/coders.py
 ##########
 @@ -1383,22 +1375,74 @@ def from_runner_api_parameter(payload, components, 
context):
         write_state_threshold=int(payload))
 
 
-class RunnerAPICoderHolder(Coder):
+class ElementTypeHolder(typehints.TypeConstraint):
+  """A dummy element type for external coders that cannot be parsed in 
Python"""
+  def __init__(self, coder, context):
+    self.coder = coder
+    self.context = context
+
+
+class ExternalCoder(Coder):
   """A `Coder` that holds a runner API `Coder` proto.
 
   This is used for coders for which corresponding objects cannot be
   initialized in Python SDK. For example, coders for remote SDKs that may
   be available in Python SDK transform graph when expanding a cross-language
   transform.
   """
-  def __init__(self, proto):
-    self._proto = proto
 
-  def proto(self):
-    return self._proto
+  coder_count = 0
 
 Review comment:
   This was just added for logging/debugging. Removed.

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