You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by yi...@apache.org on 2022/08/13 02:14:43 UTC

[arrow] branch master updated: PARQUET-2172: [C++] Change field return type to const NodePtr& (#13865)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2575ad4146 PARQUET-2172: [C++] Change field return type to const NodePtr& (#13865)
2575ad4146 is described below

commit 2575ad414606aa91ed0f6c66435b8df8c4070cfa
Author: emkornfield <em...@gmail.com>
AuthorDate: Fri Aug 12 19:14:37 2022 -0700

    PARQUET-2172: [C++] Change field return type to const NodePtr& (#13865)
    
    Authored-by: emkornfield <em...@gmail.com>
    Signed-off-by: Yibo Cai <yi...@arm.com>
---
 cpp/src/parquet/schema.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpp/src/parquet/schema.h b/cpp/src/parquet/schema.h
index 9e06040226..1c440b1133 100644
--- a/cpp/src/parquet/schema.h
+++ b/cpp/src/parquet/schema.h
@@ -285,7 +285,7 @@ class PARQUET_EXPORT GroupNode : public Node {
 
   bool Equals(const Node* other) const override;
 
-  NodePtr field(int i) const { return fields_[i]; }
+  const NodePtr& field(int i) const { return fields_[i]; }
   // Get the index of a field by its name, or negative value if not found.
   // If several fields share the same name, it is unspecified which one
   // is returned.