You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python] Pretty printing very large ChunkedArray objects can use unbounded memory #20692
The object arrow_arr has 129 chunks, each element of which is 1MB of binary. The repr for this object is over 600MB:
In [10]: rep = repr(arrow_arr)
In [11]: len(rep)
Out[11]: 637536258
There's probably a number of failsafes we can implement to avoid badness in these pathological cases (which may not happen often, but given the kinds of bug reports we are seeing, people do have datasets that look like this)
Wes McKinney / @wesm:
What we probably need to do is implement a global size bound on the output of PrettyPrint so that we bail out early when we hit a particular limit (e.g. around a megabyte or so). This is a pretty significant refactor of src/arrow/pretty_print.cc since there are many functions that write directly into std::ostream without any size book-keeping. This isn't causing enough of a user problem to require us to fix it right now
This issue has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this issue will be closed in 14 days. If this improvement is still desired but has no current owner, please add the 'Status: needs champion' label.
Activity
asfimport commentedon Jun 24, 2019
Wes McKinney / @wesm:
What we probably need to do is implement a global size bound on the output of
PrettyPrintso that we bail out early when we hit a particular limit (e.g. around a megabyte or so). This is a pretty significant refactor ofsrc/arrow/pretty_print.ccsince there are many functions that write directly intostd::ostreamwithout any size book-keeping. This isn't causing enough of a user problem to require us to fix it right nowgithub-actions commentedon Dec 11, 2025
This issue has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this issue will be closed in 14 days. If this improvement is still desired but has no current owner, please add the 'Status: needs champion' label.