You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2020/04/09 14:36:00 UTC

[jira] [Comment Edited] (ARROW-8364) [Python] Get Access to the type_to_type_id dictionary

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

Joris Van den Bossche edited comment on ARROW-8364 at 4/9/20, 2:35 PM:
-----------------------------------------------------------------------

Of course,

 

The code is [here|https://codeshare.io/G8d0Pe]

 

{code}
def is_serializable(obj_type: type) -> bool:
    return obj_type in type_to_type_id.keys()
{code}


was (Author: archybald):
Of course,

 

The code is [here|https://codeshare.io/G8d0Pe]

> [Python] Get Access to the type_to_type_id dictionary
> -----------------------------------------------------
>
>                 Key: ARROW-8364
>                 URL: https://issues.apache.org/jira/browse/ARROW-8364
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Or
>            Priority: Trivial
>              Labels: easyfix, performance
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Hi,
> h3. *The Problem:*
> Currently, if I try to serialize and it can't be serialized by the default serialization context I get 
> SerializationCallbackError. So the problem is that I have to try to serialize the object in order to know if it is serializable by the package. That can be a very expensive operation for a simple check if the object contains a large amount of data.
>  
> h3. *The* *Requested*  *Improvement / Feature**:*
>  
> A function that checks if the type of the object I'm about to serialize is serializable by the package (meaning it is registered under the type_to_type_id dictionary).  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)