Skip to content

Commit

Permalink
python parquet: default to lz4 compression (#3129)
Browse files Browse the repository at this point in the history
* python parquet: default to lz4 compression

* temp fix test
  • Loading branch information
ritchie46 committed Apr 12, 2022
1 parent 3708721 commit ff29698
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion py-polars/polars/internals/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ def write_parquet(
],
str,
]
] = "snappy",
] = "lz4",
statistics: bool = False,
use_pyarrow: bool = False,
**kwargs: Any,
Expand Down
3 changes: 2 additions & 1 deletion py-polars/tests/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ def test_parquet_datetime() -> None:
df = pl.DataFrame(data)
df = df.with_column(df["datetime"].cast(pl.Datetime))

df.write_parquet(f, use_pyarrow=True)
# todo! test all compressions here
df.write_parquet(f, use_pyarrow=True, compression="snappy")
f.seek(0)
read = pl.read_parquet(f)
assert read.frame_equal(df)
Expand Down

0 comments on commit ff29698

Please sign in to comment.