You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "0x26res (via GitHub)" <gi...@apache.org> on 2023/02/01 13:45:46 UTC

[GitHub] [arrow] 0x26res opened a new issue, #33971: [Python] segfault when calling nbytes on empty table with dictionary field

0x26res opened a new issue, #33971:
URL: https://github.com/apache/arrow/issues/33971

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   Using `pyarrow.Table.nbytes` on an empty table with a dictionary field causes a segmentation fault.
   
   ```python
   import pyarrow as pa
   
   schema = pa.schema(
       [
           pa.field("foo", pa.dictionary(pa.int32(), pa.string())),
       ]
   )
   table = pa.table({"foo": []}, schema=schema)
   
   print(table.nbytes)  # segmentation fault  python
   ```
   
   A few notes:
   - `get_total_buffer_size` works (which is a good workaround for now)
   - It works if the table has got one or more row (including nulls)
   - It works if the table is empty but there are not dictionary fields
   - I'm using `pyarrow==11.0.0` and Python 3.9.16 (but it is happening in `10.0.1` as well, so not a new bug)
   
   
   
   ### Component(s)
   
   Python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] westonpace closed issue #33971: [Python] segfault when calling nbytes on empty table with dictionary field

Posted by "westonpace (via GitHub)" <gi...@apache.org>.
westonpace closed issue #33971: [Python] segfault when calling nbytes on empty table with dictionary field
URL: https://github.com/apache/arrow/issues/33971


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org