merlimat commented on a change in pull request #2848: Make IdentitySerde handle
bytes as well
URL: https://github.com/apache/pulsar/pull/2848#discussion_r228308475
##########
File path: pulsar-client-cpp/python/pulsar/functions/serde.py
##########
@@ -75,6 +75,8 @@ def __init__(self):
def serialize(self, input):
if type(input) in self._types:
return str(input).encode('utf-8')
+ if type(input) == bytes:
+ return input
raise TypeError
Review comment:
We should also add context on the type that we got passed here
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services