mapleFU commented on code in PR #41580:
URL: https://github.com/apache/arrow/pull/41580#discussion_r1664484980


##########
cpp/src/parquet/column_writer.cc:
##########
@@ -1405,6 +1408,25 @@ class TypedColumnWriterImpl : public ColumnWriterImpl, 
public TypedColumnWriter<
     return pages_change_on_record_boundaries_;
   }
 
+  void AddKeyValueMetadata(
+      const std::shared_ptr<const KeyValueMetadata>& key_value_metadata) 
override {
+    if (closed_) {
+      throw ParquetException("Cannot add key-value metadata to closed column");
+    }

Review Comment:
   in file_writer. the code looks like below:
   
   ```c++
     void AddKeyValueMetadata(
         const std::shared_ptr<const KeyValueMetadata>& key_value_metadata) 
override {
       if (key_value_metadata_ == nullptr) {
         key_value_metadata_ = key_value_metadata;
       } else if (key_value_metadata != nullptr) {
         key_value_metadata_ = key_value_metadata_->Merge(*key_value_metadata);
       }
     }
   ```
   
   Check null or ignore null is both ok for me, maybe we can keep the same style



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