apache / arrow

Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing
https://arrow.apache.org/
Apache License 2.0
13.88k stars 3.38k forks source link

[Python] Pyarrow IPC guide is missing sink.close() #28611

Open asfimport opened 3 years ago

asfimport commented 3 years ago

In the document: https://arrow.apache.org/docs/python/ipc.html

writer.close() is stated but sink.close() is not. In trying to apply the documentation using compression I got

OSError: Truncated compressed stream

After including sink.close() the problem was resolved.

Reporter: Yale Yng-Wong

Externally tracked issue: https://arrow.apache.org/docs/python/ipc.html

PRs and other links:

Note: This issue was originally created as ARROW-12881. Please see the migration documentation for further details.

asfimport commented 3 years ago

David Li / @lidavidm: Thanks for the report! Would you like to submit a quick PR?

asfimport commented 3 years ago

Yale Yng-Wong: No problem, submitted now.