alexowens90 opened a new issue, #49309:
URL: https://github.com/apache/arrow/issues/49309
### Describe the bug, including details regarding any error messages,
version, and platform.
Calling `to_batches` on a zero-row table returns an empty list, losing the
schema information:
```
Python 3.13.5 (main, Jun 12 2025, 08:56:14) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyarrow as pa
>>> pa.__version__
'23.0.1'
>>> table = pa.table({"col": pa.array([], pa.int64())})
>>> table.to_batches()
[]
```
I would expect the result to be a single-element list, containing a
`RecordBatch` with zero rows, and the same schema as the original table.
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]