From 6bcf11edd9282e2e1ffaf9b72793b49b646497d9 Mon Sep 17 00:00:00 2001 From: Daniel Munoz Date: Fri, 26 Apr 2024 18:04:23 -0700 Subject: [PATCH] Fix bug in DwrfReader onRead Summary: https://github.com/facebookincubator/velox/pull/9640 We weren't translating to loadUnitIdx. Reviewed By: kgpai, Sullivan-Patrick Differential Revision: D56658575 fbshipit-source-id: 5c293be30a7e43afd67252d291b58d6bd1cb4ae6 --- velox/dwio/dwrf/reader/DwrfReader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/velox/dwio/dwrf/reader/DwrfReader.cpp b/velox/dwio/dwrf/reader/DwrfReader.cpp index 99e981e40a75..258c09bb7f1b 100644 --- a/velox/dwio/dwrf/reader/DwrfReader.cpp +++ b/velox/dwio/dwrf/reader/DwrfReader.cpp @@ -648,7 +648,8 @@ uint64_t DwrfRowReader::next( // reading of the data. auto strideSize = getReader().getFooter().rowIndexStride(); strideIndex_ = strideSize > 0 ? currentRowInStripe_ / strideSize : 0; - unitLoader_->onRead(currentStripe_, currentRowInStripe_, rowsToRead); + const auto loadUnitIdx = currentStripe_ - firstStripe_; + unitLoader_->onRead(loadUnitIdx, currentRowInStripe_, rowsToRead); readNext(rowsToRead, mutation, result); currentRowInStripe_ += rowsToRead; return rowsToRead;