Search in sources :

Example 1 with FunctionListBuilder

use of com.facebook.presto.metadata.FunctionListBuilder in project presto by prestodb.

the class AbstractTestFunctions method registerParametricScalar.

protected void registerParametricScalar(Class<?> clazz) {
    Metadata metadata = functionAssertions.getMetadata();
    List<SqlFunction> functions = new FunctionListBuilder().scalar(clazz).getFunctions();
    metadata.getFunctionRegistry().addFunctions(functions);
}
Also used : Metadata(com.facebook.presto.metadata.Metadata) FunctionListBuilder(com.facebook.presto.metadata.FunctionListBuilder) SqlFunction(com.facebook.presto.metadata.SqlFunction)

Example 2 with FunctionListBuilder

use of com.facebook.presto.metadata.FunctionListBuilder in project presto by prestodb.

the class AbstractTestFunctions method registerScalar.

protected void registerScalar(Class<?> clazz) {
    Metadata metadata = functionAssertions.getMetadata();
    List<SqlFunction> functions = new FunctionListBuilder().scalars(clazz).getFunctions();
    metadata.getFunctionRegistry().addFunctions(functions);
}
Also used : Metadata(com.facebook.presto.metadata.Metadata) FunctionListBuilder(com.facebook.presto.metadata.FunctionListBuilder) SqlFunction(com.facebook.presto.metadata.SqlFunction)

Aggregations

FunctionListBuilder (com.facebook.presto.metadata.FunctionListBuilder)2 Metadata (com.facebook.presto.metadata.Metadata)2 SqlFunction (com.facebook.presto.metadata.SqlFunction)2