You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Vedant Roy (Jira)" <ji...@apache.org> on 2022/10/07 02:52:00 UTC
[jira] [Created] (ARROW-17957) NativeFile.download does not work on TemporaryFiles
Vedant Roy created ARROW-17957:
----------------------------------
Summary: NativeFile.download does not work on TemporaryFiles
Key: ARROW-17957
URL: https://issues.apache.org/jira/browse/ARROW-17957
Project: Apache Arrow
Issue Type: Bug
Environment: Ubuntu
Reporter: Vedant Roy
The following code doesn't work:
{code:java}
with tempfile.TemporaryFile() as temp_file:
f.download(temp_file) {code}
where `f` is a `pyarrow.NativeFile`.
I get the error:
```
(_execute_read_task pid=126666) f.download(temp_file)
(_execute_read_task pid=126666) File "pyarrow/io.pxi", line 576, in pyarrow.lib.NativeFile.download
(_execute_read_task pid=126666) File "pyarrow/io.pxi", line 291, in pyarrow.lib.NativeFile.seek
(_execute_read_task pid=126666) File "pyarrow/io.pxi", line 190, in pyarrow.lib.NativeFile.get_random_access_file
(_execute_read_task pid=126666) File "pyarrow/io.pxi", line 219, in pyarrow.lib.NativeFile._assert_seekable
(_execute_read_task pid=126666) OSError: only valid on seekable files
```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)