use of io.crate.metadata.FunctionIdent in project crate by crate.
the class PercentileAggregationTest method testReturnTypes.
@Test
public void testReturnTypes() throws Exception {
FunctionIdent synopsis1 = new FunctionIdent(NAME, ImmutableList.<DataType>of(DataTypes.DOUBLE, DataTypes.DOUBLE));
assertEquals(DataTypes.DOUBLE, functions.get(synopsis1).info().returnType());
FunctionIdent synopsis2 = new FunctionIdent(NAME, ImmutableList.<DataType>of(DataTypes.DOUBLE, new ArrayType(DataTypes.DOUBLE)));
assertEquals(new ArrayType(DataTypes.DOUBLE), functions.get(synopsis2).info().returnType());
}
use of io.crate.metadata.FunctionIdent in project crate by crate.
the class SumAggregationTest method testReturnType.
@Test
public void testReturnType() throws Exception {
FunctionIdent fi = new FunctionIdent("sum", ImmutableList.<DataType>of(DataTypes.INTEGER));
// Return type is fixed to Double
assertEquals(DataTypes.DOUBLE, functions.get(fi).info().returnType());
}
Aggregations