kylebarron opened a new issue, #6415:
URL: https://github.com/apache/arrow-rs/issues/6415

   **Describe the bug**
   
   The line here:
   
https://github.com/apache/arrow-rs/blob/5414f1d7c0683c64d69cf721a83c17d677c78a71/arrow-ipc/src/convert.rs#L98
   
   panics
   
   ```
   panicked at 
/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arrow-ipc-53.0.0/src/convert.rs:98:30:
   called `Option::unwrap()` on a `None` value
   ```
   
   on list array data created by Arrow JavaScript, which does not have a name 
field set. The name [is not required to be 
set](https://docs.rs/arrow-ipc/latest/arrow_ipc/gen/Schema/struct.Field.html#method.name).
   
   **To Reproduce**
   
   This JavaScript code creates this IPC buffer (output data here: 
[data.arrows.zip](https://github.com/user-attachments/files/17047057/data.arrows.zip))
   
   ```js
   import { tableFromArrays, tableToIPC } from "apache-arrow"
   import { Table } from "parquet-wasm"
   
   const table = tableFromArrays({
     column: [[1, 2], [3, 4]],
   })
   const ipc = tableToIPC(table, "stream")
   // This loads the IPC buffer using arrow-rs
   Table.fromIPCStream(ipc)
   ```
   
   Loading this with pyarrow, we see that the inner list field has no name set 
(which pyarrow infers as an empty string)
   
   ```py
   In [1]: import pyarrow as pa
   
   In [3]: pa.ipc.open_stream("data.arrows").read_all()
   Out[3]:
   pyarrow.Table
   column: list<: double>
     child 0, : double
   ----
   column: [[[1,2],[3,4]]]
   ```
   
   **Expected behavior**
   
   IPC Reader should not panic.
   
   **Additional context**
   
   Originally reported in https://github.com/kylebarron/parquet-wasm/issues/606


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