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