use of com.yahoo.bullet.querying.postaggregations.ComputationStrategy in project bullet-core by yahoo.
the class ComputationTest method testComputation.
@Test
public void testComputation() {
Computation computation = new Computation(Collections.singletonList(new Field("abc", new ValueExpression(1))));
Assert.assertEquals(computation.getFields(), Collections.singletonList(new Field("abc", new ValueExpression(1))));
Assert.assertEquals(computation.getType(), PostAggregationType.COMPUTATION);
Assert.assertEquals(computation.toString(), "{type: COMPUTATION, fields: [{name: abc, value: {value: 1, type: INTEGER}}]}");
Assert.assertTrue(computation.getPostStrategy() instanceof ComputationStrategy);
}
Aggregations