File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -629,14 +629,14 @@ def write_parquet(
629629 path (str | pathlib.Path): The file path to write the Parquet file.
630630 compression (str): The compression algorithm to use. Default is "ZSTD".
631631 compression_level (int | None): The compression level to use. For ZSTD, the
632- recommended range is 1 to 22, with the default being 3 . Higher levels
632+ recommended range is 1 to 22, with the default being 4 . Higher levels
633633 provide better compression but slower speed.
634634 """
635635 if compression == "ZSTD" :
636636 if compression_level is None :
637- # Default compression level for ZSTD is 3 as per
638- # https://facebook. github.io/zstd/zstd_manual.html
639- compression_level = 3
637+ # Default compression level for ZSTD is 4 like in delta-rs
638+ # https://github.com/apache/datafusion-python/pull/981#discussion_r1899871918
639+ compression_level = 4
640640 elif not (1 <= compression_level <= 22 ):
641641 raise ValueError ("Compression level for ZSTD must be between 1 and 22" )
642642 self .df .write_parquet (str (path ), compression , compression_level )
You can’t perform that action at this time.
0 commit comments