LogicalAnd implements AggregateFunction<Boolean, LogicalAnd> { public LogicalAnd(String fieldName) { this.fieldName = fieldName; } LogicalAnd(String fieldName); @Override void initialize(); @Override void mergeValue(StructuredRecord record); @Override void mergeAggregates(LogicalAnd otherAgg); @Override Boolean getAggregate(); @Override Schema getOutputSchema();  }
@Test public void logicalAndTest() { Schema fieldSchema = Schema.of(Schema.Type.BOOLEAN); Schema schema = Schema.recordOf("test", Schema.Field.of("x", Schema.nullableOf(fieldSchema))); test(new LogicalAnd("x"), schema, "x", true, Arrays.asList(true, true, true), new LogicalAnd("x")); test(new LogicalAnd("x"), schema, "x", false, Arrays.asList(true, false, true), new LogicalAnd("x")); }