Describe the bug, including details regarding any error messages, version, and platform.
Table.to_batches should check for max_chunksize > 0 and raise an exception if not true. This is hard to debug because it creates an infinite loop where Jupyter just hangs.
import pyarrow as pa
table = pa.table({'a': [1, 2, 3, 4]})
table.to_batches(max_chunksize=0)
# hangs forever
It also led to OOM.

Component(s)
Python