@Test public void testCount() { Schema schema = Schema.recordOf( "test", Schema.Field.of("x", Schema.nullableOf(Schema.of(Schema.Type.INT)))); test(new Count("x"), schema, "x", 3L, Arrays.asList(1, 2, null, null, 3), new Count("x")); test(new Count("y"), schema, "x", 0L, Arrays.asList(1, 2, null, null, 3), new Count("y")); }
public Count(String fieldName) { this.fieldName = fieldName; }
Count implements AggregateFunction<Long, Count> { public Count(String fieldName) { this.fieldName = fieldName; } }
Count implements AggregateFunction<Long, Count> { public Count(String fieldName) { this.fieldName = fieldName; } Count(String fieldName); }
Count implements AggregateFunction<Long, Count> { public Count(String fieldName) { this.fieldName = fieldName; } Count(String fieldName); @Override void initialize(); @Override void mergeValue(StructuredRecord record); @Override void mergeAggregates(Count otherAgg); @Override Long getAggregate(); @Override Schema getOutputSchema(); }
Count implements AggregateFunction<Long, Count> { public Count(String fieldName) { this.fieldName = fieldName; } Count(String fieldName); @Override void initialize(); @Override void mergeValue(StructuredRecord record); @Override void mergeAggregates(Count otherAgg); @Override Long getAggregate(); @Override Schema getOutputSchema();  }