Minor fix to standard error check in approx_distinct test
For types with small value sets (e.g. TINYINT), standard deviation
can be small or even zero. This will fail the current check since it
asserts the standard deviation is within a range of maxStandardError.
@@ -108,7 +108,7 @@ public abstract class AbstractTestApproximateCountDistinct
}
assertLessThan(stats.getMean(), 1.0e-2);
- assertLessThan(Math.abs(stats.getStandardDeviation() - maxStandardError), 1.0e-2);
+ assertLessThan(stats.getStandardDeviation(), 1.0e-2 + maxStandardError);
}
@Test(dataProvider = "provideStandardErrors")
