coderex2522 commented on a change in pull request #1073: URL: https://github.com/apache/orc/pull/1073#discussion_r841001995
########## File path: c++/src/sargs/SargsApplier.cc ########## @@ -122,4 +124,58 @@ namespace orc { return mHasSelected; } + bool SargsApplier::evaluateColumnStatistics( + const PbColumnStatistics& colStats) const { + const auto& leaves = + dynamic_cast<const SearchArgumentImpl *>(mSearchArgument)->getLeaves(); + std::vector<TruthValue> leafValues( + leaves.size(), TruthValue::YES_NO_NULL); + + for (size_t pred = 0; pred != leaves.size(); ++pred) { + uint64_t columnId = mFilterColumns[pred]; + if (columnId == INVALID_COLUMN_ID) { Review comment: It has been simplified here. ########## File path: c++/src/Reader.cc ########## @@ -1050,16 +1060,26 @@ namespace orc { rowsInCurrentStripe = currentStripeInfo.numberofrows(); if (sargsApplier) { - // read row group statistics and bloom filters of current stripe - loadStripeIndex(); - - // select row groups to read in the current stripe - sargsApplier->pickRowGroups(rowsInCurrentStripe, - rowIndexes, - bloomFilterIndex); - if (sargsApplier->hasSelectedFrom(currentRowInStripe)) { - // current stripe has at least one row group matching the predicate - break; + bool isStripeNeeded = true; + if (contents->metadata && !sargsApplier->evaluateStripeStatistics( + rowsInCurrentStripe, Review comment: 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: dev-unsubscr...@orc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org