Skip to content

Commit

Permalink
Improve checks readibility
Browse files Browse the repository at this point in the history
  • Loading branch information
2 people authored and tdcmeehan committed Dec 18, 2023
1 parent 1525e04 commit 7cd24d1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ public static Domain getDomain(
return Domain.all(type);
}

if (statistics.getNumNulls() == rowCount) {
if (statistics.isNumNullsSet() && statistics.getNumNulls() == rowCount) {
return Domain.onlyNull(type);
}

boolean hasNullValue = statistics.getNumNulls() != 0L;
boolean hasNullValue = !statistics.isNumNullsSet() || statistics.getNumNulls() != 0L;

if (!statistics.hasNonNullValue() || statistics.genericGetMin() == null || statistics.genericGetMax() == null) {
return Domain.create(ValueSet.all(type), hasNullValue);
Expand Down

0 comments on commit 7cd24d1

Please sign in to comment.