public AggregationStateFactory MakeFactory() { var sortUsingCollator = _methodResolutionService.IsSortUsingCollator; var comparator = CollectionUtil.GetComparator(_evaluators, sortUsingCollator, _sortDescending); var criteriaKeyBinding = _methodResolutionService.GetCriteriaKeyBinding(_evaluators); AggregationStateFactory factory; if (_ever) { var spec = new AggregationStateMinMaxByEverSpec(_streamNum, _evaluators, _parent.IsMax, comparator, criteriaKeyBinding); factory = new ProxyAggregationStateFactory() { ProcCreateAccess = (methodResolutionService, agentInstanceId, groupId, aggregationId, join, groupKey) => methodResolutionService.MakeAccessAggMinMaxEver(agentInstanceId, groupId, aggregationId, spec), ProcAggregationExpression = () => _parent, }; } else { var spec = new AggregationStateSortedSpec(_streamNum, _evaluators, comparator, criteriaKeyBinding); factory = new ProxyAggregationStateFactory() { ProcCreateAccess = (methodResolutionService, agentInstanceId, groupId, aggregationId, join, groupKey) => { if (join) { return(methodResolutionService.MakeAccessAggSortedJoin(agentInstanceId, groupId, aggregationId, spec)); } return(methodResolutionService.MakeAccessAggSortedNonJoin(agentInstanceId, groupId, aggregationId, spec)); }, ProcAggregationExpression = () => _parent, }; } return(factory); }
public AggregationStateFactory MakeMinMaxEver( StatementExtensionSvcContext statementExtensionSvcContext, ExprAggMultiFunctionSortedMinMaxByNode expr, AggregationStateMinMaxByEverSpec spec) { return(new AggregationStateFactoryMinMaxByEver(expr, spec)); }
public AggregationStateFactory MakeFactory() { var sortUsingCollator = _engineImportService.IsSortUsingCollator; var comparator = CollectionUtil.GetComparator(_evaluators, sortUsingCollator, _sortDescending); if (_ever) { var specX = new AggregationStateMinMaxByEverSpec( _streamNum, _evaluators, _parent.IsMax, comparator, null); return(_engineImportService.AggregationFactoryFactory.MakeMinMaxEver(_statementExtensionSvcContext, _parent, specX)); } var spec = new AggregationStateSortedSpec(_streamNum, _evaluators, comparator, null); return(_engineImportService.AggregationFactoryFactory.MakeSorted(_statementExtensionSvcContext, _parent, spec)); }
public AggregationState MakeAccessAggMinMaxEver(int agentInstanceId, int groupId, int aggregationId, AggregationStateMinMaxByEverSpec spec, AggregationServicePassThru passThru) { return(new AggregationStateMinMaxByEver(spec)); }
public AggregationStateFactoryMinMaxByEver(ExprAggMultiFunctionSortedMinMaxByNode expr, AggregationStateMinMaxByEverSpec spec) { Expr = expr; Spec = spec; }