[ 
https://issues.apache.org/jira/browse/ARROW-1753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16226670#comment-16226670
 ] 

ASF GitHub Bot commented on ARROW-1753:
---------------------------------------

dhirschfeld commented on issue #1272: ARROW-1753 [Python] Provide for matching 
subclasses with register_type in serialization context
URL: https://github.com/apache/arrow/pull/1272#issuecomment-340740645
 
 
   Hmmm, not sure what's going on there:
   ```
   ____________________________ test_match_subclasses 
____________________________
       def test_match_subclasses():
           # should be able to serialize/deserialize an instance
           # if a base class has been registered
           serialization_context = pa.SerializationContext()
           serialization_context.register_type(Foo, "Foo")
           serialization_context.register_type(Bar, "Bar")
           serialization_context.register_type(Baz, "Baz")
           serialization_context.register_type(Qux, "Quz")
       
           subqux = SubQux()
           # should fallbact to Qux serializer
   >       serialized_object = pa.serialize(subqux, serialization_context)
   pyarrow\tests\test_serialization.py:432: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _
   serialization.pxi:235: in pyarrow.lib.serialize
       ???
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _
   >   ???
   E   pyarrow.lib.SerializationCallbackError: pyarrow does not know how to 
serialize objects of type <class 'int'>.
   error.pxi:98: SerializationCallbackError
   ```

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


> [Python] Provide for matching subclasses with register_type in serialization 
> context
> ------------------------------------------------------------------------------------
>
>                 Key: ARROW-1753
>                 URL: https://issues.apache.org/jira/browse/ARROW-1753
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Wes McKinney
>              Labels: pull-request-available
>             Fix For: 0.8.0
>
>
> Copied from https://github.com/apache/arrow/issues/1269
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to