Commits


Felipe Oliveira Carvalho authored and GitHub committed 1e00e7af04d
GH-36317: [C++] Return a BufferVector from CleanListOffsets (#36316) ### Rationale for this change `CleanListOffsets` is taking output parameters when it could return multiple buffers in a vector exactly how they are supposed to be used to construct the list-like array. Besides that, having the logic for setting the validity buffer split between it and the caller is unnecessarily confusing. ### What changes are included in this PR? - Addition of a new constructor for `MapArray` that can accept a pre-allocated `BufferVector` - Removal of output parameter in `CleanListOffsets` and change of return type ### Are these changes tested? Yes, by existing tests. A pre-existing `MapArray` ctor delegates to this new ctor, so all tests that exercise the old ctor also exercise the new. * Closes: #36317 Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>