You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Matthew Rocklin (Jira)" <ji...@apache.org> on 2019/11/15 17:32:00 UTC

[jira] [Commented] (ARROW-6926) [Python] Support __sizeof__ protocol for Python objects

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

Matthew Rocklin commented on ARROW-6926:
----------------------------------------

Someone ended up contributing these to Dask (we have a diispatch mechanism to work around these not being implemented upstream).  Obviously it would have been nicer for this code to be implemented in Arrow originally, but I thought I'd point to it here in case it's helpful to others.

https://github.com/dask/dask/blob/539d1e27a8ccce01de5f3d49f1748057c27552f2/dask/sizeof.py#L115-L145

> [Python] Support __sizeof__ protocol for Python objects
> -------------------------------------------------------
>
>                 Key: ARROW-6926
>                 URL: https://issues.apache.org/jira/browse/ARROW-6926
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Matthew Rocklin
>            Priority: Minor
>             Fix For: 1.0.0
>
>
> It would be helpful if PyArrow objects implemented the `__sizeof__` protocol to give other libraries hints about how much data they have allocated.  This helps systems like Dask, which have to make judgements about whether or not something is cheap to move or taking up a large amount of space.



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