pitrou commented on code in PR #51631:
URL: https://github.com/apache/arrow/pull/51631#discussion_r4467715138


##########
python/pyarrow/io.pxi:
##########
@@ -193,6 +193,23 @@ cdef class NativeFile(_Weakrefable):
                 else:
                     check_status(self.output_stream.get().Close())
 
+    def abort(self):
+        """
+        Close the stream abruptly.
+
+        The stream is always closed, but whether written data is flushed or
+        discarded depends on the implementation. Output streams of
+        :class:`~pyarrow.fs.S3FileSystem` discard all written data: the
+        multipart upload is aborted and no object is written. A
+        :class:`~pyarrow.PythonFile` leaves its wrapped Python file object 
open.

Review Comment:
   I'm not sure we want to say anything specific about S3 and other 
implementations here. How about:
   
   ```suggestion
           discarded depends on the implementation.
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to