diff --git a/cpp/src/arrow/testing/random.h b/cpp/src/arrow/testing/random.h index 64d02023129f4..269ce3eabf6b4 100644 --- a/cpp/src/arrow/testing/random.h +++ b/cpp/src/arrow/testing/random.h @@ -468,9 +468,10 @@ class ARROW_TESTING_EXPORT RandomArrayGenerator { /// \brief Generate a random SparseUnionArray /// - /// The type ids are chosen randomly, according to a uniform distribution, - /// amongst the given child fields. + /// The type ids are chosen randomly from `type.type_codes()`, according to a uniform + /// distribution, amongst the given child fields. /// + /// \param[in] type The union data type /// \param[in] fields Vector of Arrays containing the data for each union field /// \param[in] size The size of the generated sparse union array /// \param[in] alignment alignment for memory allocations (in bytes) @@ -482,10 +483,11 @@ class ARROW_TESTING_EXPORT RandomArrayGenerator { /// \brief Generate a random DenseUnionArray /// - /// The type ids are chosen randomly, according to a uniform distribution, - /// amongst the given child fields. The offsets are incremented along + /// The type ids are chosen randomly from `type.type_codes()`, according to a uniform + /// distribution, amongst the given child fields. The offsets are incremented along /// each child field. /// + /// \param[in] type The union data type /// \param[in] fields Vector of Arrays containing the data for each union field /// \param[in] size The size of the generated sparse union array /// \param[in] alignment alignment for memory allocations (in bytes)