You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To allow factoring out serialization code to a common base class it would be useful if register_type matches all subclasses rather than simply an exact match on the specific type.
It might be possible with a simple change to _serialize_callback:
"serialize objects of type {}.".format(type(obj)), obj)
type_id =self.type_to_type_id[type(obj)]
def_serialize_callback(self, obj):
FOUND=Falsefortype_intype(obj).mro():
iftype_inself.type_to_type_id:
FOUND=TruebreakifnotFOUND:
raiseSerializationCallbackError(
"pyarrow does not know how to ""serialize objects of type {}.".format(type(obj)), obj
)
# use the closest match to type(obj)type_id=self.type_to_type_id[type_]
The text was updated successfully, but these errors were encountered:
To allow factoring out serialization code to a common base class it would be useful if
register_type
matches all subclasses rather than simply an exact match on the specific type.It might be possible with a simple change to
_serialize_callback
:arrow/python/pyarrow/serialization.pxi
Lines 90 to 95 in 30158ad
The text was updated successfully, but these errors were encountered: