anoojpatel opened a new issue, #38854:
URL: https://github.com/apache/arrow/issues/38854

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   MWE:
   create test file:
   ```
     #test.py
     x = 1 +2
     def func(x):
         return x + 1
   ```
   push to GCS
   `gsutil cp test.py gs://bucket/`
   
   run:
   ```
   from pyarrow.fs import GcsFileSystem
   
   fs = GcsFileSystem()
   f = fs.open_input_file("bucket/test.py")
   
   f.size()
   #Out[9]: 48
   
   f.seek(0,2) # WHENCE EOF = 2
   ---------------------------------------------------------------------------
   ArrowInvalid                              Traceback (most recent call last)
   Cell In[10], line 1
   ----> 1 f.seek(0,2)
   
   File 
~/.virtualenvs/freenome-omicflow-cWG4Q8m1-py3.10/lib/python3.10/site-packages/pyarrow/io.pxi:323,
 in pyarrow.lib.NativeFile.seek()
   
   File 
~/.virtualenvs/freenome-omicflow-cWG4Q8m1-py3.10/lib/python3.10/site-packages/pyarrow/error.pxi:100,
 in pyarrow.lib.check_status()
   
   ArrowInvalid: google::cloud::Status(OUT_OF_RANGE: Permanent error 
ReadObjectNotWrapped: <?xml version='1.0' 
encoding='UTF-8'?><Error><Code>InvalidRange</Code><Message>The requested range 
cannot be satisfied.</Message><Details>bytes=10448-</Details></Error>)
   ```
   
   I expect this is because we use the `gcs::Generation` which makes a byte 
range call to gcs, and by HTTP byte-range RFC, bytes are inclusive, and doesn't 
contain an EOF byte
   
   ### Component(s)
   
   C++, Python


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

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

Reply via email to