claudevdm commented on code in PR #35725:
URL: https://github.com/apache/beam/pull/35725#discussion_r2310297826


##########
sdks/python/apache_beam/coders/coders.py:
##########
@@ -180,7 +180,8 @@ def is_deterministic(self):
     """
     return False
 
-  def as_deterministic_coder(self, step_label, error_message=None):
+  def as_deterministic_coder(
+      self, step_label, error_message=None, update_compatibility_version=None):

Review Comment:
   The problem is that the CoderRegistry does not directly fetchthe 
deterministic coder, but rather the nonderterministic FastPrimitivesCoder. Then 
later on the FastPrimitivesCoder is coerced into a deterministic version with 
FastPrimitivesCoder.as_deterministic_coder(update_compat_version).
   
   For your suggestion to work we could
   1. registry.set_update_compat_version() early during pipeline construction
   2. In set_update_compat_version we add a class attribute on 
FastPrimitivesCoder.update_compat_version
   3. The rest stays the same i.e. when 
FastPrimitivesCoder.as_deterministic_coder is called it checks 
update_compat_version?   



-- 
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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to