tschaub opened a new pull request, #37786:
URL: https://github.com/apache/arrow/pull/37786

   ### Rationale for this change
   
   The key value file metadata may include information generated while writing 
row groups.  Currently, it is not possible to set the key value file metadata 
after creating a writer.  With the changes in this branch, key value pairs may 
be added any time before closing the writer.
   
   ### What changes are included in this PR?
   
   This branch adds a `writer.AppendKeyValueMetadata(key, value)` method to the 
parquet `file.Writer` and to the `pqarrow.FileWriter`.
   
   ### Are these changes tested?
   
   Tests are added for the new functionality.
   
   ### Are there any user-facing changes?
   
   The `KeyValueMetadata` field on the parquet `file.Writer` has been renamed 
to `initialKeyValueMetadata`.  This is a breaking change.  Although the field 
was exported, setting it did not result in new key value metadata being 
written.  Instead, it represented the initial key value metadata if the writer 
was passed the `WithWriteMetadata` write option.
   
   The `WithWriteMetadata` option can still be used to provide the initial key 
value metadata values.  In addition, the `AppendKeyValueMetadata` method can be 
called to add key value pairs after creating a writer.
   
   The `FileMetadata` field on the parquet `file.Writer` has been removed.  
Previously, setting this field value had no effect.
   
   <!--
   If there are any breaking changes to public APIs, please uncomment the line 
below and explain which changes are breaking.
   -->
   **This PR includes breaking changes to public APIs.** 
   
   The `KeyValueMetadata` field is no longer exported from the parquet 
`file.Writer` struct.  Use the `WithWriteMetadata` writer option to set key 
value metadata when creating a writer or use the `AppendKeyValueMetadata` 
method to add key value metadata after creating a writer.
   
   The `FileMetadata` field on the parquet `file.Writer` has been removed.


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