Skip to content

Commit

Permalink
Remove fast path for all null in filter
Browse files Browse the repository at this point in the history
  • Loading branch information
yma11 committed Jul 19, 2024
1 parent c92a493 commit 3ba9a56
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions velox/dwio/common/ScanSpec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,7 @@ bool testFilter(
const TypePtr& type) {
bool mayHaveNull = true;

// Has-null statistics is often not set. Hence, we supplement it with
// number-of-values statistic to detect no-null columns more often.
// Number-of-values is the number of non-null values. When it is equal to
// total number of values, we know there are no nulls.
if (stats->getNumberOfValues().has_value()) {
if (stats->getNumberOfValues().value() == 0) {
// Column is all null.
return filter->testNull();
}
mayHaveNull = stats->getNumberOfValues().value() < totalRows;
}

Expand Down

0 comments on commit 3ba9a56

Please sign in to comment.