Skip to content

Commit 52e579c

Browse files
committed
Add test for compliant Parquet
1 parent cc7e6a8 commit 52e579c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

pandas/tests/io/test_parquet.py

+14
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,20 @@ def test_read_parquet_manager(self, pa, using_array_manager):
931931
else:
932932
assert isinstance(result._mgr, pd.core.internals.BlockManager)
933933

934+
@td.skip_if_no("pyarrow", min_version="4.0.0")
935+
def test_list_column_results_in_compliant_parquet(self, pa):
936+
# https://github.com/pandas-dev/pandas/issues/26551
937+
df = pd.DataFrame({"a": [[1], [2]]})
938+
939+
with tm.ensure_clean() as path:
940+
df.to_parquet(path, pa)
941+
result = pyarrow.parquet.read_table(path)
942+
943+
assert (
944+
str(result.schema.get_field_by_name("a").type)
945+
== "list<element: list<element: int64>>"
946+
)
947+
934948

935949
class TestParquetFastParquet(Base):
936950
def test_basic(self, fp, df_full):

0 commit comments

Comments
 (0)