wgtmac commented on code in PR #1100:
URL: https://github.com/apache/orc/pull/1100#discussion_r860405424
##########
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:
Is it better to call skip() out of this scope since the naming of current
function is startNextStripe(). It should only happen when seekToRow() is
called. Or we can add an input parameter to startNextStripe() advising the
target row to start.
--
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]