Skip to content

Commit 795850d

Browse files
author
shouzhi
committed
repalce matchingDictEntries with matchedEntriesCount
1 parent 23cf348 commit 795850d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

c++/src/sargs/SargsApplier.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ namespace orc {
228228
size_t dictSize = dictionary.dictionaryOffset.size() - 1;
229229

230230
// Use a set to store matching dictionary entries
231-
std::set<size_t> matchingDictEntries;
231+
size_t matchedEntriesCount = 0;
232232

233233
for (size_t i = 0; i < dictSize; ++i) {
234234
int64_t start = offsets[i];
@@ -238,18 +238,18 @@ namespace orc {
238238
// Check if this dictionary entry matches any literal in the IN list
239239
for (const auto& literalView : literalViews) {
240240
if (dictEntry == literalView) {
241-
matchingDictEntries.insert(i);
241+
matchedEntriesCount++;
242242
break;
243243
}
244244
}
245245
}
246246

247247
// If all dictionary entries match, return YES
248-
if (matchingDictEntries.size() == dictSize) {
248+
if (matchedEntriesCount == dictSize) {
249249
return TruthValue::YES;
250250
}
251251
// If any dictionary entry matches, stripe might contain matching rows
252-
else if (!matchingDictEntries.empty()) {
252+
else if (!matchedEntriesCount == 0) {
253253
return TruthValue::YES_NO_NULL;
254254
}
255255
// No dictionary entry matches any literal in the IN list - skip stripe

0 commit comments

Comments
 (0)