Skip to content

Commit bceef41

Browse files
committed
fix: update test for execution plan and add validation for invalid LZO compression
1 parent e53844b commit bceef41

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

python/tests/test_dataframe.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -731,9 +731,7 @@ def test_optimized_logical_plan(aggregate_df):
731731
def test_execution_plan(aggregate_df):
732732
plan = aggregate_df.execution_plan()
733733

734-
expected = (
735-
"AggregateExec: mode=FinalPartitioned, gby=[c1@0 as c1], aggr=[sum(test.c2)]\n" # noqa: E501
736-
)
734+
expected = "AggregateExec: mode=FinalPartitioned, gby=[c1@0 as c1], aggr=[sum(test.c2)]\n" # noqa: E501
737735

738736
assert expected == plan.display()
739737

@@ -1128,6 +1126,16 @@ def test_write_compressed_parquet_default_compression_level(df, tmp_path, compre
11281126
df.write_parquet(str(path), compression=compression)
11291127

11301128

1129+
# lzo is not a valid Compression yet
1130+
# https://github.com/apache/arrow-rs/issues/6970
1131+
# Test write_parquet with lzo compression, should raise an error
1132+
def test_write_compressed_parquet_lzo(df, tmp_path):
1133+
path = tmp_path / "test.parquet"
1134+
1135+
with pytest.raises(ValueError, match="lzo is not a valid Compression"):
1136+
df.write_parquet(str(path), compression="lzo")
1137+
1138+
11311139
def test_dataframe_export(df) -> None:
11321140
# Guarantees that we have the canonical implementation
11331141
# reading our dataframe export

0 commit comments

Comments
 (0)