Skip to content

Commit 5cb1c0e

Browse files
committed
fix: correct LZ0 to LZO in compression options
1 parent 2d8b1d3 commit 5cb1c0e

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

python/datafusion/dataframe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Compression(Enum):
5757
GZIP = "gzip"
5858
BROTLI = "brotli"
5959
LZ4 = "lz4"
60-
LZ0 = "lz0"
60+
LZO = "lzo"
6161
ZSTD = "zstd"
6262
LZ4_RAW = "lz4_raw"
6363

@@ -696,7 +696,7 @@ def write_parquet(
696696
- "snappy": Snappy compression.
697697
- "gzip": Gzip compression.
698698
- "brotli": Brotli compression.
699-
- "lz0": LZ0 compression.
699+
- "lzo": LZO compression.
700700
- "lz4": LZ4 compression.
701701
- "lz4_raw": LZ4_RAW compression.
702702
- "zstd": Zstandard compression.

python/tests/test_dataframe.py

Lines changed: 1 addition & 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

src/dataframe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ impl PyDataFrame {
491491
ZstdLevel::try_new(verify_compression_level(compression_level)? as i32)
492492
.map_err(|e| PyValueError::new_err(format!("{e}")))?,
493493
),
494-
"lz0" => Compression::LZO,
494+
"lzo" => Compression::LZO,
495495
"lz4" => Compression::LZ4,
496496
"lz4_raw" => Compression::LZ4_RAW,
497497
"uncompressed" => Compression::UNCOMPRESSED,

0 commit comments

Comments
 (0)