tustvold commented on code in PR #3367:
URL: https://github.com/apache/arrow-rs/pull/3367#discussion_r1052467082


##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -158,6 +158,13 @@ impl<W: Write> ArrowWriter<W> {
         self.flush_rows(self.buffered_rows)
     }
 
+    /// Update key value metadata.

Review Comment:
   ```suggestion
       /// Additional [`KeyValue`] metadata to be written in addition to those 
from [`WriterProperties`]
   ```



##########
parquet/src/file/writer.rs:
##########
@@ -298,7 +301,10 @@ impl<W: Write> SerializedFileWriter<W> {
             row_groups,
             version: self.props.writer_version().as_num(),
             schema: types::to_thrift(self.schema.as_ref())?,
-            key_value_metadata: self.props.key_value_metadata().cloned(),
+            key_value_metadata: 
self.props.key_value_metadata().cloned().map(|mut v| {
+                v.extend(self.kv_metadatas.clone());
+                v
+            }),

Review Comment:
   ```suggestion
               key_value_metadata: 
self.props.key_value_metadata().iter().chain(&self.kv_metadatas).cloned().collect(),
   ```
   Or something, perhaps?



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