// apply returning the strategy instance
SubSelectStrategyRealization result = factoryDesc.getFactory().instantiate(services, subselectActivationResult.getViewable(), agentInstanceContext, stopCallbackList);
// set aggregation
final SubordTableLookupStrategy lookupStrategy = result.getStrategy();
final SubselectAggregationPreprocessorBase aggregationPreprocessor = result.getSubselectAggregationPreprocessor();
// determine strategy
ExprSubselectStrategy strategy;
if (aggregationPreprocessor != null) {
strategy = new ExprSubselectStrategy() {
public Collection<EventBean> evaluateMatching(EventBean[] eventsPerStream, ExprEvaluatorContext exprEvaluatorContext) {
Collection<EventBean> matchingEvents = lookupStrategy.lookup(eventsPerStream, exprEvaluatorContext);
aggregationPreprocessor.evaluate(eventsPerStream, matchingEvents, exprEvaluatorContext);
return CollectionUtil.SINGLE_NULL_ROW_EVENT_SET;
}
};
}
else {