Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
yujun777 committed Jan 26, 2025
1 parent f86c29f commit ccffd6e
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,10 @@ private Map<Expression, MinMaxValue> getExprMinMaxValues(UnknownValue valueDesc)
Range<Literal> newRange = value.range.intersection(otherValue.range);
if (!newRange.isEmpty()) {
value.range = newRange;
// If newRange.lowerEndpoint().equals(newRange.upperEndpoint()),
// then isDiscrete should be true.
// But no need to do that because AddMinMax will not handle discrete value cases.
value.isDiscrete = value.isDiscrete && otherValue.isDiscrete;
if (newRange.hasLowerBound() && newRange.hasUpperBound()
&& newRange.lowerEndpoint().compareTo(newRange.upperEndpoint()) == 0
&& newRange.lowerBoundType() == BoundType.CLOSED
&& newRange.upperBoundType() == BoundType.CLOSED) {
value.isDiscrete = true;
}
} else {
value.range = null;
}
Expand Down

0 comments on commit ccffd6e

Please sign in to comment.