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

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   A `fixed_size_list<T>` array with `list_size=0` can be written to Parquet 
successfully but fails to read back with
   ```
   ArrowInvalid: Expected all lists to be of size=0 but index 1 had size=1
   ```
   
   Note also that the high-level constructor 
`pa.FixedSizeListArray.from_arrays` explicitly rejects `list_size=0` with 
`"list_size needs to be a strict positive integer"`, but the type can still be 
constructed via `Array.from_buffers`, and `pq.write_table` accepts it without 
complaint. The API is inconsistent: either the type should be rejected 
everywhere, or it should round-trip correctly.
   
   ```
   inner = pa.array([], type=pa.float32())  # 0 child values
   fsl = pa.FixedSizeListArray.from_arrays(inner, list_size=0)
   ```
   raises
   ```
   ArrowInvalid: list_size needs to be a strict positive integer
   ```
   
   ### Reproducer
   ```python
   import pyarrow as pa
   import pyarrow.parquet as pq
   
   fsl = pa.Array.from_buffers(
       pa.list_(pa.float32(), 0),
       length=50,
       buffers=[None],
       children=[pa.array([], type=pa.float32())],
   )
   table = pa.table({"x": fsl})
   
   pq.write_table(table, "tmp.parquet")   # OK
   pq.read_table("tmp.parquet")           # ArrowInvalid
   ```
   
   ### Component(s)
   
   Parquet, 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: [email protected]

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

Reply via email to