felipecrv opened a new pull request, #34896:
URL: https://github.com/apache/arrow/pull/34896
### Rationale for this change
The value of `RunEndEncodedArraySpan::Iterator::physical_pos_` from the
instance returned by `RunEndEncodedArraySpan::end()` is smaller (by 1) than the
results of successive applications of `operator++()` until `logical_pos_`
reaches the logical length of the run-end encoded array.
To support backwards iteration, the `Iterator` returned by
`RunEndEncodedArraySpan::end()` should be well-formed.
There was no `operator--()` in `RunEndEncodedArraySpan::Iterator` before
this PR, so one can't go backwards from `end()` and this latent bug doesn't
manifest.
### What changes are included in this PR?
- Addition of `RunEndEncodedArraySpan::Iterator::operator--()`
- Addition of `MergedRunsIterator::operator--()`
- Rename `isEnd()` to `is_end()` (it was a code-style violation)
- More test cases
### Are these changes tested?
By existing and new unit tests.
### Are there any user-facing changes?
A public function -- `isEnd` -- was renamed, but this code hasn't been
released yet, so it's OK.
--
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]