From 66fdfed87247ae7fbf855b58287e677daf2c39f1 Mon Sep 17 00:00:00 2001 From: Felipe Oliveira Carvalho Date: Mon, 15 Jul 2024 14:53:11 -0300 Subject: [PATCH] concatenate.cc: Fix docstring about the out parameter --- cpp/src/arrow/array/concatenate.cc | 2 ++ cpp/src/arrow/array/concatenate.h | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cpp/src/arrow/array/concatenate.cc b/cpp/src/arrow/array/concatenate.cc index d96dce4d14675..b4638dd6593d8 100644 --- a/cpp/src/arrow/array/concatenate.cc +++ b/cpp/src/arrow/array/concatenate.cc @@ -921,6 +921,8 @@ namespace internal { Result> Concatenate( const ArrayVector& arrays, MemoryPool* pool, std::shared_ptr* out_suggested_cast) { + DCHECK(out_suggested_cast); + *out_suggested_cast = nullptr; if (arrays.size() == 0) { return Status::Invalid("Must pass at least one array"); } diff --git a/cpp/src/arrow/array/concatenate.h b/cpp/src/arrow/array/concatenate.h index c22f3043ec3f6..aada5624d63a3 100644 --- a/cpp/src/arrow/array/concatenate.h +++ b/cpp/src/arrow/array/concatenate.h @@ -30,10 +30,9 @@ namespace internal { /// /// \param[in] arrays a vector of arrays to be concatenated /// \param[in] pool memory to store the result will be allocated from this memory pool -/// \param[out] out_suggested_cast if non-NULL, the function might set it to a cast -/// suggestion that would allow concatenating the arrays -/// without overflow of offsets (e.g. string to -/// large_string) +/// \param[out] out_suggested_cast if a non-OK Result is returned, the function might set +/// out_suggested_cast to a cast suggestion that would allow concatenating the arrays +/// without overflow of offsets (e.g. string to large_string) /// /// \return the concatenated array ARROW_EXPORT