diff --git a/cpp/src/arrow/array/array_nested.cc b/cpp/src/arrow/array/array_nested.cc index fb2efe9ae50c3..1053153d88bf5 100644 --- a/cpp/src/arrow/array/array_nested.cc +++ b/cpp/src/arrow/array/array_nested.cc @@ -807,7 +807,7 @@ MapArray::MapArray(const std::shared_ptr& type, int64_t length, Result> MapArray::FromArraysInternal( std::shared_ptr type, const std::shared_ptr& offsets, const std::shared_ptr& keys, const std::shared_ptr& items, - MemoryPool* pool, const std::shared_ptr& null_bitmap) { + MemoryPool* pool, std::shared_ptr null_bitmap) { using offset_type = typename MapType::offset_type; using OffsetArrowType = typename CTypeTraits::ArrowType; @@ -861,7 +861,7 @@ Result> MapArray::FromArraysInternal( Result> MapArray::FromArrays( const std::shared_ptr& offsets, const std::shared_ptr& keys, const std::shared_ptr& items, MemoryPool* pool, - const std::shared_ptr& null_bitmap) { + std::shared_ptr null_bitmap) { return FromArraysInternal(std::make_shared(keys->type(), items->type()), offsets, keys, items, pool, null_bitmap); } @@ -869,7 +869,7 @@ Result> MapArray::FromArrays( Result> MapArray::FromArrays( std::shared_ptr type, const std::shared_ptr& offsets, const std::shared_ptr& keys, const std::shared_ptr& items, - MemoryPool* pool, const std::shared_ptr& null_bitmap) { + MemoryPool* pool, std::shared_ptr null_bitmap) { if (type->id() != Type::MAP) { return Status::TypeError("Expected map type, got ", type->ToString()); } diff --git a/cpp/src/arrow/array/array_nested.h b/cpp/src/arrow/array/array_nested.h index f96b6bd3b1346..a6d4977839ef1 100644 --- a/cpp/src/arrow/array/array_nested.h +++ b/cpp/src/arrow/array/array_nested.h @@ -537,13 +537,13 @@ class ARROW_EXPORT MapArray : public ListArray { static Result> FromArrays( const std::shared_ptr& offsets, const std::shared_ptr& keys, const std::shared_ptr& items, MemoryPool* pool = default_memory_pool(), - const std::shared_ptr& null_bitmap = NULLPTR); + std::shared_ptr null_bitmap = NULLPTR); static Result> FromArrays( std::shared_ptr type, const std::shared_ptr& offsets, const std::shared_ptr& keys, const std::shared_ptr& items, MemoryPool* pool = default_memory_pool(), - const std::shared_ptr& null_bitmap = NULLPTR); + std::shared_ptr null_bitmap = NULLPTR); const MapType* map_type() const { return map_type_; } @@ -563,7 +563,7 @@ class ARROW_EXPORT MapArray : public ListArray { static Result> FromArraysInternal( std::shared_ptr type, const std::shared_ptr& offsets, const std::shared_ptr& keys, const std::shared_ptr& items, - MemoryPool* pool, const std::shared_ptr& null_bitmap = NULLPTR); + MemoryPool* pool, std::shared_ptr null_bitmap = NULLPTR); private: const MapType* map_type_;