@Test public void testAddRange() { PlanNodeStatsEstimate unknownRowCount = statistics(NaN, NaN, NaN, NON_EMPTY_RANGE); PlanNodeStatsEstimate emptyRange = statistics(10, NaN, NaN, StatisticRange.empty()); PlanNodeStatsEstimate unknownRange = statistics(10, NaN, NaN, openRange(NaN)); PlanNodeStatsEstimate first = statistics(10, NaN, NaN, new StatisticRange(12, 100, 2)); PlanNodeStatsEstimate second = statistics(10, NaN, NaN, new StatisticRange(101, 200, 3)); assertAddRange(unknownRange, unknownRange, NEGATIVE_INFINITY, POSITIVE_INFINITY); assertAddRange(unknownRowCount, second, NEGATIVE_INFINITY, POSITIVE_INFINITY); assertAddRange(unknownRange, second, NEGATIVE_INFINITY, POSITIVE_INFINITY); assertAddRange(emptyRange, second, 101, 200); assertAddRange(first, second, 12, 200); }