Search in sources :

Example 1 with GeoPlugin

use of com.facebook.presto.plugin.geospatial.GeoPlugin in project presto by prestodb.

the class AbstractTestGeoAggregationFunctions method registerFunctions.

@BeforeClass
public void registerFunctions() {
    GeoPlugin plugin = new GeoPlugin();
    for (Type type : plugin.getTypes()) {
        functionAssertions.getFunctionAndTypeManager().addType(type);
    }
    functionAssertions.getMetadata().registerBuiltInFunctions(extractFunctions(plugin.getFunctions()));
    FunctionAndTypeManager functionAndTypeManager = functionAssertions.getMetadata().getFunctionAndTypeManager();
    function = functionAndTypeManager.getAggregateFunctionImplementation(functionAndTypeManager.lookupFunction(getFunctionName(), fromTypes(GEOMETRY)));
}
Also used : Type(com.facebook.presto.common.type.Type) FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) GeoPlugin(com.facebook.presto.plugin.geospatial.GeoPlugin) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

Type (com.facebook.presto.common.type.Type)1 FunctionAndTypeManager (com.facebook.presto.metadata.FunctionAndTypeManager)1 GeoPlugin (com.facebook.presto.plugin.geospatial.GeoPlugin)1 BeforeClass (org.testng.annotations.BeforeClass)1