use of org.apache.druid.query.aggregation.post.ConstantPostAggregator in project druid by druid-io.
the class ArrayOfDoublesSketchToMeansPostAggregatorTest method testComparator.
@Test
public void testComparator() {
expectedException.expect(IAE.class);
expectedException.expectMessage("Comparing arrays of mean values is not supported");
final PostAggregator postAgg = new ArrayOfDoublesSketchToMeansPostAggregator("a", new ConstantPostAggregator("", 0));
postAgg.getComparator();
}
use of org.apache.druid.query.aggregation.post.ConstantPostAggregator in project druid by druid-io.
the class ArrayOfDoublesSketchTTestPostAggregatorTest method testToString.
@Test
public void testToString() {
final PostAggregator postAgg = new ArrayOfDoublesSketchTTestPostAggregator("a", Arrays.asList(new ConstantPostAggregator("", 0), new ConstantPostAggregator("", 0)));
Assert.assertEquals("ArrayOfDoublesSketchTTestPostAggregator{name='a', fields=[ConstantPostAggregator{name='', constantValue=0}, ConstantPostAggregator{name='', constantValue=0}]}", postAgg.toString());
}
use of org.apache.druid.query.aggregation.post.ConstantPostAggregator in project druid by druid-io.
the class ArrayOfDoublesSketchTTestPostAggregatorTest method testSerde.
@Test
public void testSerde() throws JsonProcessingException {
final PostAggregator there = new ArrayOfDoublesSketchTTestPostAggregator("a", Arrays.asList(new ConstantPostAggregator("", 0), new ConstantPostAggregator("", 0)));
DefaultObjectMapper mapper = new DefaultObjectMapper();
ArrayOfDoublesSketchTTestPostAggregator andBackAgain = mapper.readValue(mapper.writeValueAsString(there), ArrayOfDoublesSketchTTestPostAggregator.class);
Assert.assertEquals(there, andBackAgain);
Assert.assertArrayEquals(there.getCacheKey(), andBackAgain.getCacheKey());
}
use of org.apache.druid.query.aggregation.post.ConstantPostAggregator in project druid by druid-io.
the class ArrayOfDoublesSketchTTestPostAggregatorTest method testComparator.
@Test
public void testComparator() {
expectedException.expect(IAE.class);
expectedException.expectMessage("Comparing arrays of p values is not supported");
PostAggregator postAgg = new ArrayOfDoublesSketchTTestPostAggregator("a", Arrays.asList(new ConstantPostAggregator("", 0), new ConstantPostAggregator("", 0)));
postAgg.getComparator();
}
use of org.apache.druid.query.aggregation.post.ConstantPostAggregator in project druid by druid-io.
the class ArrayOfDoublesSketchToEstimatePostAggregatorTest method testToString.
@Test
public void testToString() {
PostAggregator postAgg = new ArrayOfDoublesSketchToEstimatePostAggregator("a", new ConstantPostAggregator("", 0));
Assert.assertEquals("ArrayOfDoublesSketchToEstimatePostAggregator{name='a', field=ConstantPostAggregator{name='', constantValue=0}}", postAgg.toString());
}
Aggregations