From 7f1a989a1fc76cd9631eed2675ffa41b6cee4bbe Mon Sep 17 00:00:00 2001 From: emkornfield Date: Thu, 11 Aug 2022 23:14:11 -0700 Subject: [PATCH] PARQUET-2172: [C++] Change field return type to const NodePtr& --- 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 9e06040226b80..1c440b1133ef7 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.