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

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Hi, 
   
   **TL;DR** Calling `const table =  await arrow.tableFromIPC(response.body!)` 
results in `Error: Unrecognized type: "undefined" (24)`. Not sure how to keep 
debugging. 
   
   I have a backend which which takes a polars dataframe and returns it in IPC 
format: 
   
   ```python
   @router.get('/df')
   def df() -> Response:
     """Returns a sample polars dataframe in ipc format."""
     ...
     buffer = df.select(pl.col('string_column')).write_ipc(None, 
compression='uncompressed')
     buffer.seek(0)
     return Response(
       buffer.getvalue(),
       media_type='application/octet-stream',
       headers={'Content-Type': 'application/octet-stream'},
     )
   ```
   
   If I try to parse this request on the frontend using `tableFromIPC`, I keep 
getting the error above: 
   
   ```typescript
   const response = await fetch(url, {method: 'GET' })
   const table =  await arrow.tableFromIPC(response.body!)
   ```
   
   This fails with `Error: Unrecognized type: "undefined" (24)`. 
   
   **Note**
   
   I have also tried to visit the backend directly, save its response to a 
local disk, and read from disk instead: 
   ```typescript
    const temp = readFileSync('/download')
    const table = arrow.tableFromIPC(temp)
   ```
   
   but this fails with the same error (`Error: Unrecognized type: "undefined" 
(24)`). 
   
   I have tried many things, but without success. The error message offers no 
real insights and I don't know how else to keep going. 
   
   Would appreciate any help!
   
   ### Component(s)
   
   JavaScript


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