pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jerrypeng commented on a change in pull request #2762: Fix IdentitySerde
Date Wed, 10 Oct 2018 17:30:06 GMT
jerrypeng commented on a change in pull request #2762: Fix IdentitySerde
URL: https://github.com/apache/pulsar/pull/2762#discussion_r224171356
 
 

 ##########
 File path: pulsar-client-cpp/python/pulsar/functions/serde.py
 ##########
 @@ -68,9 +68,9 @@ def deserialize(self, input_bytes):
       return pickle.loads(input_bytes)
 
 class IdentitySerDe(SerDe):
-  """Pickle based serializer"""
+  """utf-8 based identity serializer"""
   def serialize(self, input):
-    return input
+    return bytes(str(input).encode('utf-8'))
 
 Review comment:
   how can we assume that the string representation of the object is meaningful?  The identity
serde is also used as the default serde in python which is going to cause errors if users
inputs/outputs anything other than Strings 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message