You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/06/01 16:09:27 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #10427: ARROW-12881: [Python] Pyarrow IPC guide is missing sink.close()

pitrou commented on a change in pull request #10427:
URL: https://github.com/apache/arrow/pull/10427#discussion_r643247160



##########
File path: docs/source/python/ipc.rst
##########
@@ -105,6 +105,11 @@ An important point is that if the input source supports zero-copy reads
 (e.g. like a memory map, or ``pyarrow.BufferReader``), then the returned
 batches are also zero-copy and do not allocate any new memory on read.
 
+All stream objects have a ``close`` method. In the above example 
+:func:`~pyarrow.BufferOutputStream.getvalue` both closes and returns the buffer.
+If the return object is not needed, call the relevent ``close`` method
+after you are finished using the object to avoid data corruption issues.

Review comment:
       Also mention that the context protocol should work as well (i.e. the `with` statement).




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org