ExpressionCountAggregationResult extends AggregationResult { public long getEstimatedUniqueCount() { if (estimatedUniqueCount == UNDEFINED) { updateEstimate(); } return estimatedUniqueCount; } @SuppressWarnings("UnusedDeclaration")  ExpressionCountAggregationResult();  ExpressionCountAggregationResult(Sketch<?> initialSketch, UniqueCountEstimator<Sketch<?>> estimator); long getEstimatedUniqueCount(); @Override ResultNode getRank(); Sketch<?> getSketch(); @Override void visitMembers(ObjectVisitor visitor); @Override int hashCode(); static final int classId; }
@Test public void requireThatEstimateIsCorrect() { ExpressionCountAggregationResult aggr = createAggregationWithSparseSketch(42); assertTrue(aggr.getEstimatedUniqueCount() == 1); }