diff --git a/Cargo.toml b/Cargo.toml index 809653c97bcf..681e06959d7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,10 +34,10 @@ bitflags = "1.3" [workspace.dependencies.arrow] package = "arrow2" # git = "https://github.com/jorgecarleitao/arrow2" -# git = "https://github.com/ritchie46/arrow2" +git = "https://github.com/ritchie46/arrow2" # rev = "368aacc173a27e2a763d2c6396682a688e5a2707" # path = "../arrow2" -# branch = "polars_2022-12-13" +branch = "polars_2022-12-29" version = "0.15" default-features = false features = [ diff --git a/py-polars/Cargo.lock b/py-polars/Cargo.lock index a0acd9f47d37..afa204a025ec 100644 --- a/py-polars/Cargo.lock +++ b/py-polars/Cargo.lock @@ -85,8 +85,7 @@ dependencies = [ [[package]] name = "arrow2" version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b843531e0a9d8dac44b0aa6adc926b2d970e8a627fe2105cd0498d5f93a6e97f" +source = "git+https://github.com/ritchie46/arrow2?branch=polars_2022-12-29#9989d9caf17a9b1e37345b3220c94ebe1a913f7d" dependencies = [ "ahash", "arrow-format", diff --git a/py-polars/tests/unit/io/test_parquet.py b/py-polars/tests/unit/io/test_parquet.py index 962056e208bc..1f40101a1467 100644 --- a/py-polars/tests/unit/io/test_parquet.py +++ b/py-polars/tests/unit/io/test_parquet.py @@ -2,6 +2,7 @@ import io import os +import typing from typing import TYPE_CHECKING import numpy as np @@ -304,3 +305,30 @@ def test_parquet_5795() -> None: df_pd.to_parquet(f) f.seek(0) assert pl.read_parquet(f).frame_equal(pl.from_pandas(df_pd)) + + +@typing.no_type_check +def test_parquet_nesting_structs_list() -> None: + f = io.BytesIO() + df = pl.from_records( + [ + { + "id": 1, + "list_of_structs_col": [ + {"a": 10, "b": [10, 11, 12]}, + {"a": 11, "b": [13, 14, 15]}, + ], + }, + { + "id": 2, + "list_of_structs_col": [ + {"a": 44, "b": [12]}, + ], + }, + ] + ) + + df.write_parquet(f) + f.seek(0) + + assert pl.read_parquet(f).frame_equal(df)