stiga-huang commented on code in PR #1100:
URL: https://github.com/apache/orc/pull/1100#discussion_r860529755
##########
c++/src/Reader.cc:
##########
@@ -1113,7 +1115,11 @@ namespace orc {
sargsApplier->getNextSkippedRows());
previousRow = firstRowOfStripe[currentStripe] + currentRowInStripe - 1;
if (currentRowInStripe > 0) {
- seekToRowGroup(static_cast<uint32_t>(currentRowInStripe /
footer->rowindexstride()));
+ auto rowIndexStride = footer->rowindexstride();
+ auto rowGroupId = static_cast<uint32_t>(currentRowInStripe /
rowIndexStride);
+ uint64_t rowsToSkip = currentRowInStripe % rowIndexStride;
+ seekToRowGroup(rowGroupId);
+ reader->skip(rowsToSkip);
Review Comment:
OK, I moved the changes to seekToRow(). Also added some test coverage on the
case when the file doesn't have row indexes.
--
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]