提交 797b4b82 编写于 作者: M marcusalmeida 提交者: Jia Zhai

fixing python function example custom_object_function.py (#4946)

(cherry picked from commit 33441ea0)
上级 5a5533fa
......@@ -31,10 +31,10 @@ class CustomSerDe(SerDe):
pass
def serialize(self, object):
return "%d,%d" % (object.a, object.b)
return ("%d,%d" % (object.a, object.b)).encode('utf-8')
def deserialize(self, input_bytes):
split = str(input_bytes).split(',')
split = str(input_bytes.decode()).split(',')
retval = MyObject()
retval.a = int(split[0])
retval.b = int(split[1])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册