Abacn commented on issue #33802:
URL: https://github.com/apache/beam/issues/33802#issuecomment-4491020001

   Sorry wasn't clear, modified my comments. Any is backed by 
FastPrimitiveCoder:
   
   ```
   >>> from apache_beam.coders import typecoders
   >>> typecoders.registry.get_coder(object)
   FastPrimitivesCoder
   ```
   
   
https://github.com/apache/beam/blob/01b09725ec3066fcbb871bd16e54e5b5e0496865/sdks/python/apache_beam/coders/row_coder.py#L178
   
   which fallbacks to PickleCoder if it isn't a primitive (or supported 
collections like set/list/map):
   
   
https://github.com/apache/beam/blob/01b09725ec3066fcbb871bd16e54e5b5e0496865/sdks/python/apache_beam/coders/coder_impl.py#L484
   
   I was noting by annotate your dataclass with `register_row`, it then uses 
RowCoder, then it's individual Any field uses FastPrimitiveCoder, instead of 
the whole dataclass using FastPrimitiveCoder and falling back to PickleCoder


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