File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838from enum import Enum
3939
4040
41+ # excerpt from deltalake
42+ # https://github.com/apache/datafusion-python/pull/981#discussion_r1905619163
4143class Compression (Enum ):
4244 UNCOMPRESSED = "uncompressed"
4345 SNAPPY = "snappy"
@@ -58,11 +60,14 @@ def from_str(cls, value: str) -> "Compression":
5860 )
5961
6062 def get_default_level (self ) -> int :
63+ # GZIP, BROTLI defaults from deltalake
64+ # https://github.com/apache/datafusion-python/pull/981#discussion_r1905619163
6165 if self == Compression .GZIP :
6266 DEFAULT = 6
6367 elif self == Compression .BROTLI :
6468 DEFAULT = 1
6569 elif self == Compression .ZSTD :
70+ # https://github.com/apache/datafusion-python/pull/981#discussion_r1904789223
6671 DEFAULT = 4
6772 else :
6873 raise KeyError (f"{ self .value } does not have a compression level." )
You can’t perform that action at this time.
0 commit comments