Search in sources :

Example 1 with DoubleScalar

use of io.crate.operation.scalar.DoubleScalar in project crate by crate.

the class TrigonometricFunctions method register.

private static void register(ScalarFunctionModule module, String name, DoubleUnaryOperator func) {
    for (DataType inputType : DataTypes.NUMERIC_PRIMITIVE_TYPES) {
        FunctionIdent ident = new FunctionIdent(name, Collections.singletonList(inputType));
        module.register(new DoubleScalar(new FunctionInfo(ident, DataTypes.DOUBLE), func));
    }
}
Also used : FunctionIdent(io.crate.metadata.FunctionIdent) DataType(io.crate.types.DataType) FunctionInfo(io.crate.metadata.FunctionInfo) DoubleScalar(io.crate.operation.scalar.DoubleScalar)

Aggregations

FunctionIdent (io.crate.metadata.FunctionIdent)1 FunctionInfo (io.crate.metadata.FunctionInfo)1 DoubleScalar (io.crate.operation.scalar.DoubleScalar)1 DataType (io.crate.types.DataType)1