You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "rluvaton (via GitHub)" <gi...@apache.org> on 2026/03/04 20:22:20 UTC
[PR] fix: first next_back() on new RowsIter panics [arrow-rs]
rluvaton opened a new pull request, #9505:
URL: https://github.com/apache/arrow-rs/pull/9505
# Which issue does this PR close?
N/A
# Rationale for this change
it should not panic
# What changes are included in this PR?
correctly use last row in `next_back`
# Are these changes tested?
yes
# Are there any user-facing changes?
they can now use `next_back`
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: first next_back() on new RowsIter panics [arrow-rs]
Posted by "rluvaton (via GitHub)" <gi...@apache.org>.
rluvaton commented on code in PR #9505:
URL: https://github.com/apache/arrow-rs/pull/9505#discussion_r2888773513
##########
arrow-row/src/lib.rs:
##########
@@ -1415,7 +1415,7 @@ impl DoubleEndedIterator for RowsIter<'_> {
return None;
}
// Safety: We have checked that `start` is less than `end`
- let row = unsafe { self.rows.row_unchecked(self.end) };
+ let row = unsafe { self.rows.row_unchecked(self.end - 1) };
self.end -= 1;
Review Comment:
yes, done
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: first next_back() on new RowsIter panics [arrow-rs]
Posted by "scovich (via GitHub)" <gi...@apache.org>.
scovich commented on code in PR #9505:
URL: https://github.com/apache/arrow-rs/pull/9505#discussion_r2887398116
##########
arrow-row/src/lib.rs:
##########
@@ -1415,7 +1415,7 @@ impl DoubleEndedIterator for RowsIter<'_> {
return None;
}
// Safety: We have checked that `start` is less than `end`
- let row = unsafe { self.rows.row_unchecked(self.end) };
+ let row = unsafe { self.rows.row_unchecked(self.end - 1) };
self.end -= 1;
Review Comment:
Should we just move the `self.end` decrement above the original `unsafe` block?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org