kosiew opened a new pull request, #981:
URL: https://github.com/apache/datafusion-python/pull/981

   
   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   Closes #978.
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.  
   -->
   
   Currently, the write_parquet method defaults to "uncompressed" Parquet 
files, which can lead to inefficient storage and slower performance during I/O 
operations. This change sets the default compression method to "ZSTD", a modern 
compression algorithm that provides an excellent balance of compression speed 
and ratio. Additionally, it introduces a default compression level of 3 for 
ZSTD, which is optimal for many use cases.
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   Updated the default compression parameter in the write_parquet method from 
"uncompressed" to "ZSTD".
   Introduced a default compression level of 3 for ZSTD if no level is 
specified.
   Added validation to ensure the compression level for ZSTD falls within the 
valid range (1 to 22) and raises a ValueError otherwise.
   Updated the docstring to clarify the default values and provide guidance for 
users on compression levels.
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   Yes:
   
   The default behavior of write_parquet now compresses output files using ZSTD 
with a default compression level of 3, instead of leaving files uncompressed.
   Users specifying an invalid compression level for ZSTD will now encounter a 
ValueError.
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->


-- 
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