use of org.apache.druid.query.aggregation.PostAggregator in project druid by druid-io.
the class ArrayOfDoublesSketchToEstimateAndBoundsPostAggregatorTest method testComparator.
@Test
public void testComparator() {
expectedException.expect(IAE.class);
expectedException.expectMessage("Comparing arrays of estimates and error bounds is not supported");
final PostAggregator postAgg = new ArrayOfDoublesSketchToEstimateAndBoundsPostAggregator("a", new ConstantPostAggregator("", 0), null);
postAgg.getComparator();
}
use of org.apache.druid.query.aggregation.PostAggregator in project druid by druid-io.
the class ArrayOfDoublesSketchToEstimateAndBoundsPostAggregatorTest method testToString.
@Test
public void testToString() {
PostAggregator postAgg = new ArrayOfDoublesSketchToEstimateAndBoundsPostAggregator("a", new ConstantPostAggregator("", 0), null);
Assert.assertEquals("ArrayOfDoublesSketchToEstimateAndBoundsPostAggregator{name='a', field=ConstantPostAggregator{name='', constantValue=0}, numStdDevs=1}", postAgg.toString());
}
use of org.apache.druid.query.aggregation.PostAggregator in project druid by druid-io.
the class ArrayOfDoublesSketchToQuantilesSketchPostAggregatorTest method testSerde.
@Test
public void testSerde() throws JsonProcessingException {
final PostAggregator there = new ArrayOfDoublesSketchToQuantilesSketchPostAggregator("a", new ConstantPostAggregator("", 0), null, null);
DefaultObjectMapper mapper = new DefaultObjectMapper();
ArrayOfDoublesSketchToQuantilesSketchPostAggregator andBackAgain = mapper.readValue(mapper.writeValueAsString(there), ArrayOfDoublesSketchToQuantilesSketchPostAggregator.class);
Assert.assertEquals(there, andBackAgain);
Assert.assertArrayEquals(there.getCacheKey(), andBackAgain.getCacheKey());
}
use of org.apache.druid.query.aggregation.PostAggregator in project druid by druid-io.
the class ArrayOfDoublesSketchToVariancesPostAggregatorTest method testComparator.
@Test
public void testComparator() {
expectedException.expect(IAE.class);
expectedException.expectMessage("Comparing arrays of variance values is not supported");
final PostAggregator postAgg = new ArrayOfDoublesSketchToVariancesPostAggregator("a", new ConstantPostAggregator("", 0));
postAgg.getComparator();
}
use of org.apache.druid.query.aggregation.PostAggregator in project druid by druid-io.
the class ArrayOfDoublesSketchToVariancesPostAggregatorTest method testSerde.
@Test
public void testSerde() throws JsonProcessingException {
final PostAggregator there = new ArrayOfDoublesSketchToVariancesPostAggregator("a", new ConstantPostAggregator("", 0));
DefaultObjectMapper mapper = new DefaultObjectMapper();
ArrayOfDoublesSketchToVariancesPostAggregator andBackAgain = mapper.readValue(mapper.writeValueAsString(there), ArrayOfDoublesSketchToVariancesPostAggregator.class);
Assert.assertEquals(there, andBackAgain);
Assert.assertArrayEquals(there.getCacheKey(), andBackAgain.getCacheKey());
}
Aggregations