Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rust): fix nested writer #5777

Merged
merged 2 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)