kosiew commented on code in PR #981:
URL: https://github.com/apache/datafusion-python/pull/981#discussion_r1906516715


##########
python/datafusion/dataframe.py:
##########
@@ -620,16 +620,25 @@ def write_csv(self, path: str | pathlib.Path, 
with_header: bool = False) -> None
     def write_parquet(
         self,
         path: str | pathlib.Path,
-        compression: str = "uncompressed",
+        compression: str = "ZSTD",
         compression_level: int | None = None,
     ) -> None:
         """Execute the :py:class:`DataFrame` and write the results to a 
Parquet file.
 
         Args:
             path: Path of the Parquet file to write.
-            compression: Compression type to use.
-            compression_level: Compression level to use.
-        """
+            compression: Compression type to use. Default is "ZSTD".
+            compression_level: Compression level to use. For ZSTD, the
+                recommended range is 1 to 22, with the default being 4. Higher 
levels
+                provide better compression but slower speed.
+        """
+        if compression == "ZSTD":

Review Comment:
   Thanks @ion-elgreco ,
   
   I [added the Compression 
Enum](https://github.com/apache/datafusion-python/pull/981/commits/df7d65e2ec4d990db714da39d20d5f57699820ad)
 but omitted the check_valid_levels because these are already implemented in 
Rust DataFrame and tested  in:
   
   
https://github.com/apache/datafusion-python/blob/63b13da4bccd66cb474186ebc2c4a1f8ba82230f/python/tests/test_dataframe.py#L1093-L1106
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to