This is an automated email from the ASF dual-hosted git repository.

pitrou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new c3f3cc11e2f MINOR: [C++] use std::move to avoid unnecessary copies 
(#49342)
c3f3cc11e2f is described below

commit c3f3cc11e2f78cc59d19d327a4e06895064cd482
Author: Jun Yao <[email protected]>
AuthorDate: Mon Nov 16 16:58:19 2026 +0800

    MINOR: [C++] use std::move to avoid unnecessary copies (#49342)
    
    ### Rationale for this change
    avoid unnecessary copies
    
    ### What changes are included in this PR?
    use std::move to avoid unnecessary copies
    
    ### Are these changes tested?
    yes
    
    ### Are there any user-facing changes?
    no
    
    Lead-authored-by: yaojun <[email protected]>
    Co-authored-by: Jason <[email protected]>
    Signed-off-by: Antoine Pitrou <[email protected]>
---
 cpp/src/parquet/arrow/reader.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpp/src/parquet/arrow/reader.cc b/cpp/src/parquet/arrow/reader.cc
index db2abfbb217..d3b8b5a05e4 100644
--- a/cpp/src/parquet/arrow/reader.cc
+++ b/cpp/src/parquet/arrow/reader.cc
@@ -1090,7 +1090,7 @@ Status GetReader(const SchemaField& field, const 
std::shared_ptr<Field>& arrow_f
       if (!schema_child_type.Equals(reader_child_type)) {
         child_field = child_field->WithType(child_reader->field()->type());
       }
-      child_fields.push_back(child_field);
+      child_fields.push_back(std::move(child_field));
       child_readers.emplace_back(std::move(child_reader));
     }
     if (child_fields.empty()) {

Reply via email to