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

   > looks like frozenset is not in the supported list and thus would fallback 
to pickling, is that correct?
   
   That's true
   
   ```
   >>> coder=typecoders.registry.get_coder(object)
   >>> a=frozenset(['a','b','c'])
   >>> coder.encode(a)
   
b'\xff\x80\x05\x95\x10\x00\x00\x00\x00\x00\x00\x00(\x8c\x01c\x94\x8c\x01a\x94\x8c\x01b\x94\x91\x94.'
   ```
   
   Note the first byte '\xff' indicates the following is encoded by PickleCoder
   
   and set is handled differently:
   
   ```
   >>> b = set({'c', 'a', 'b'})
   >>> coder.encode(b)
   b'\x08\x03\x04\x01c\x04\x01a\x04\x01b'
   ```
   
   I think it's simply frozenset isn't handled specially by FastPrimitiveCoder.


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