pitrou commented on code in PR #50297:
URL: https://github.com/apache/arrow/pull/50297#discussion_r3497266889
##########
cpp/src/arrow/compute/kernels/vector_select_k.cc:
##########
@@ -422,9 +421,8 @@ class ChunkedArraySelector : public TypeVisitor {
// so the heap must have been completely filled
DCHECK_EQ(heap.size(), output.non_null_like_range.size());
- for (uint64_t& reverse_out_iter :
- std::ranges::reverse_view(output.non_null_like_range)) {
- reverse_out_iter =
+ for (int64_t i = output.non_null_like_range.size() - 1; i >= 0; --i) {
+ output.non_null_like_range[i] =
Review Comment:
The Copilot comment is right but the suggested solution is ugly. Could be
something like:
```suggestion
for (int64_t i = output.non_null_like_range.size(); i > 0; --i) {
output.non_null_like_range[i - 1] =
```
or:
```suggestion
for (auto it = output.non_null_like_range.rbegin();
it != output.non_null_like_range.rend(); ++it) {
*it =
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]