alamb opened a new pull request, #6840:
URL: https://github.com/apache/arrow-rs/pull/6840

   # Which issue does this PR close?
   
   - Part of https://github.com/apache/arrow-rs/issues/1938
   
   # Rationale for this change
    
   While working on the upgrade to arrow 54 in DataFusion 
https://github.com/apache/datafusion/pull/13663   I found it was not clear what 
the `coerce_types` argument in `arrow_to_parquet_schema` meant or what value to 
pick to keep the existing behavior. 
   
   I had to go digging on https://github.com/apache/arrow-rs/pull/6313 to find 
what the default / old behavior was (`true` or `false`)
   
   Turns out the answer is
   ```rust
       let schema_desc = arrow_to_parquet_schema(&schema, false)?;
   ```
   
   It is clearly documented on `WriterProperties` but not on the lower level 
apis
   
   Thus I would like to propose making a new API for converting schemas where 
the defaults are clearer and deprecate `arrow_to_parquet_schema` (and revert 
the unnecessary breaking API change)
   
   # What changes are included in this PR?
   
   1. Add `ArrowToParquetSchemaConverter`, 
   2. Lots of comments / examples
   3. Revert the changes to `arrow_to_parquet_schema` made in 
https://github.com/apache/arrow-rs/pull/6313
   4. Deprecate `arrow_to_parquet_schema` with a clear message about what to 
use instread
   
   
   
   # Are there any user-facing changes?
   A new API and a deprecation of an existing one 
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please call them out.
   -->
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to