You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mapleFU (via GitHub)" <gi...@apache.org> on 2023/05/09 17:29:34 UTC

[GitHub] [arrow] mapleFU commented on a diff in pull request #35520: GH-35519: [C++][Parquet] Fixing exception handling in parquet FileSerializer

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


##########
cpp/src/parquet/file_writer.cc:
##########
@@ -380,15 +382,15 @@ class FileSerializer : public ParquetFileWriter::Contents {
   void AddKeyValueMetadata(
       const std::shared_ptr<const KeyValueMetadata>& key_value_metadata) override {
     if (key_value_metadata_ == nullptr) {
-      key_value_metadata_ = std::move(key_value_metadata);
+      key_value_metadata_ = key_value_metadata;
     } else if (key_value_metadata != nullptr) {
       key_value_metadata_ = key_value_metadata_->Merge(*key_value_metadata);
     }
   }
 
   ~FileSerializer() override {
     try {
-      Close();
+      FileSerializer::Close();

Review Comment:
   Just tiny style change. `Close` is a virtual function, but calling virtual function in dtor is not "virtual", so change it.



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org