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)));
}
Aggregations