Commits


Felipe Oliveira Carvalho authored and GitHub committed 422174e9b6c
GH-35675 [C++] Don't copy the ArraySpan into the REE ArraySpan (#35677) ### Rationale for this change Copying ArraySpan is not without issues (see #35581), and this change seems good by itself as it makes it easier for the compiler to SROA [1] the whole `RunEndEncodedArraySpan` class. [1] https://www.llvm.org/docs/Passes.html#sroa-scalar-replacement-of-aggregates ### What changes are included in this PR? - Make `array_span` private in `ree_util::RunEndEncodedArraySpan` - Allow construction of `ree_util::RunEndEncodedArraySpan` with separate `offset` and `length` - Change `RunEndEncodedBuilder` to avoid a copy of the `ArraySpan` being iterated over - Prevent instantiation based on implicit conversion from `ArrayData` to `ArraySpan` ### Are these changes tested? Yes, by the existing unit tests of the various uses of `RunEndEncodedArraySpan`. ### Are there any user-facing changes? No meaningful changes other than some small tweaks in the interface of a recently added class. * Closes: #35675 Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>