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


##########
sdks/python/apache_beam/coders/coder_impl.py:
##########
@@ -518,7 +505,7 @@ def encode_special_deterministic(self, value, stream):
             (value, type(value), self.requires_deterministic_step_label))
       init_fields = [field for field in dataclasses.fields(value) if 
field.init]
       try:
-        if dataclass_uses_kw_only(type(value)):
+        if any(field.kw_only for field in init_fields):

Review Comment:
   This gets rid of caching, so each decoded element has to repeat this check. 
   
   This might not be a big deal though, do you have any thoughts on how it 
affects encoding performance?



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

Reply via email to