pitrou commented on code in PR #35520:
URL: https://github.com/apache/arrow/pull/35520#discussion_r1188921194
##########
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:
Why is this change required?
##########
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;
Review Comment:
Good catch!
--
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]