Skip to content

[Parquet][C++] pyArrow fails to read a file from parquet-testing #47662

@ccleva

Description

@ccleva

Describe the bug, including details regarding any error messages, version, and platform.

Trying to read fixed_length_byte_array.parquet from parquet testing I got this error:

Python 3.11.13 (main, Jun 09 2025, 21:55:43) [GCC] on linux
>>> import pandas as pd
>>> df = pd.read_parquet('fixed_length_byte_array.parquet')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ccleva/.local/lib/python3.11/site-packages/pandas/io/parquet.py", line 669, in read_parquet
    return impl.read(
           ^^^^^^^^^^
  File "/home/ccleva/.local/lib/python3.11/site-packages/pandas/io/parquet.py", line 265, in read
    pa_table = self.api.parquet.read_table(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ccleva/.local/lib/python3.11/site-packages/pyarrow/parquet/core.py", line 1898, in read_table
    return dataset.read(columns=columns, use_threads=use_threads,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ccleva/.local/lib/python3.11/site-packages/pyarrow/parquet/core.py", line 1538, in read
    table = self._dataset.to_table(
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "pyarrow/_dataset.pyx", line 589, in pyarrow._dataset.Dataset.to_table
  File "pyarrow/_dataset.pyx", line 3939, in pyarrow._dataset.Scanner.to_table
  File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
  File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
OSError: Unexpected end of stream
>>> pd.__version__
'2.3.2'
>>> import pyarrow
>>> pyarrow.__version__
'21.0.0'

The file was introduced in apache/parquet-testing#31 but does not seem to be fully tested:
https://github.com/search?q=repo%3Aapache%2Farrow+fixed_length_byte_array.parquet&type=code

I recreated the file using the script in the PR in case it was corrupted but got the same error.

I tagged this as a C++ issue as it does not seem to be related to the python wrapper, correct me if I'm wrong.

Note that the java readers also fail to read this file, see apache/parquet-java#3336.

Component(s)

C++, Parquet

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions