{
throw new IllegalStateException("Error resolving aggregation: " + e.getMessage(), e);
}
// try plug-in aggregation multi-function
ConfigurationPlugInAggregationMultiFunction config = engineImportService.resolveAggregationMultiFunction(functionName);
if (config != null) {
PlugInAggregationMultiFunctionFactory factory = plugInAggregations.getMap().get(config);
if (factory == null) {
factory = (PlugInAggregationMultiFunctionFactory) JavaClassHelper.instantiate(PlugInAggregationMultiFunctionFactory.class, config.getMultiFunctionFactoryClassName());
plugInAggregations.getMap().put(config, factory);
}
factory.addAggregationFunction(new PlugInAggregationMultiFunctionDeclarationContext(functionName.toLowerCase(), distinct, engineURI, config));
return new ExprPlugInAggMultiFunctionNode(distinct, config, factory, functionName);
}