theirix opened a new pull request, #16609:
URL: https://github.com/apache/datafusion/pull/16609

   ## 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 #16260.
   
   ## Rationale for this change
   
   As mentioned in that issue, it's reasonable to autodetect a file suffix. For 
example, for gzipped CS it should be `.csv.gz`.
   
   ## What changes are included in this PR?
   
   Since the physical planner needs to understand whether compression was 
specified as a part of the abstract `FileFormat` trait, I extended it to 
provide a compression type. Based on this information, we're able to construct 
a new extension with a fallback to the original one (`.csv`).
   
   ## Are these changes tested?
   
   1. Added unit tests
   2. Run a manual example program `cargo run --example dataframe` and got a 
gzipped file `datafusion-examples/test_csv/kuz6EXRCgJqdmob3_0.csv.gz`
   
   ## Are there any user-facing changes?
   
   If the user specifies a directory to write CSV files (not a single file 
path) and the compression type, then files will have `.csv.gz` extensions 
instead of `.csv`.
   
   <!--
   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