apache / apache/arrow

[Python][C++] scanner(fragment_readahead=0).to_table() hangs indefinitely.

Open
#48,111 3 comments 0 reactions 0 assignees View on GitHub
Component: C++ Component: Python Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the bug, including details regarding any error messages, version, and platform.

I've encountered a situation where calling .to_table() on a pyarrow.dataset.Scanner causes the process to hang indefinitely.

```
import pyarrow as pa
import pyarrow.dataset as pd
import pyarrow.parquet as pq
t = pa.table({"col": 'pyarrow'})
pq.write_table(t, 'table.parquet')
pd.dataset('table.parquet').scanner(fragment_readahead=0).to_table()
# never returns
```

Note, that the data to read is minimal and the following works:

```
import pyarrow as pa
import pyarrow.dataset as pd
import pyarrow.parquet as pq
t = pa.table({"col": 'pyarrow'})
pq.write_table(t, 'table.parquet')
pd.dataset('table.parquet').scanner(fragment_readahead=0).head(100)
pyarrow.Table
col: string
----
col: [["p","y","a","r","r","o","w"]]
```

### Version(s): tested on `21.0.0` and `22.0.0` both are affected.

### Component(s)

Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.