feat: Improve to_pyarrow_batches
for PostgreSQL backend
#10938
Labels
feature
Features or general enhancements
to_pyarrow_batches
for PostgreSQL backend
#10938
Is your feature request related to a problem?
Hi,
It seems that
to_pyarrow_batches
is implemented somewhat naively in many backends. In many cases (including the SQL backends) all the data is first instantiated in the client-side cursor (or as a pandas DF) and then partitioned to batches. This means that something likeremote_con.table('huge_table').to_pyarrow_batches(...)
tries to allocate the whole table in memory.What is the motivation behind your request?
No response
Describe the solution you'd like
PostgreSQL (and maybe other backends) has a mechanism to batch the results server-side.
I can make a PR for this.
What version of ibis are you running?
10.2.0
What backend(s) are you using, if any?
PostgreSQL
Code of Conduct
The text was updated successfully, but these errors were encountered: