Skip to content

Commit

Permalink
fix(rust): fix nested writer (#5777)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Dec 12, 2022
1 parent d89aef6 commit fe2a03a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ package = "arrow2"
# git = "https://github.com/jorgecarleitao/arrow2"
git = "https://github.com/ritchie46/arrow2"
# rev = "368aacc173a27e2a763d2c6396682a688e5a2707"
# path = "../../../arrow2"
branch = "polars_2022-12-10"
# path = "../arrow2"
branch = "polars_2022-12-11"
version = "0.14.1"
default-features = false
features = [
Expand Down
2 changes: 1 addition & 1 deletion py-polars/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions py-polars/tests/unit/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,17 @@ def test_row_group_size_saturation() -> None:
df.write_parquet(f, row_group_size=1024)
f.seek(0)
assert pl.read_parquet(f).frame_equal(df)


def test_nested_sliced() -> None:
for df in [
pl.Series([[1, 2], [3, 4], [5, 6]]).slice(2, 2).to_frame(),
pl.Series([[None, 2], [3, 4], [5, 6]]).to_frame(),
pl.Series([[None, 2], [3, 4], [5, 6]]).slice(2, 2).to_frame(),
pl.Series([["a", "a"], ["", "a"], ["c", "de"]]).slice(3, 2).to_frame(),
pl.Series([[None, True], [False, False], [True, True]]).slice(2, 2).to_frame(),
]:
f = io.BytesIO()
df.write_parquet(f)
f.seek(0)
assert pl.read_parquet(f).frame_equal(df)

0 comments on commit fe2a03a

Please sign in to comment.