コード例 #1
0
 public ExprAggMultiFunctionLinearAccessNodeFactoryAccess(ExprAggMultiFunctionLinearAccessNode parent, AggregationAccessor accessor, Type accessorResultType, EventType containedEventType, AggregationStateKey optionalStateKey, AggregationStateFactory optionalStateFactory, AggregationAgent optionalAgent)
 {
     _parent               = parent;
     _accessor             = accessor;
     _accessorResultType   = accessorResultType;
     _containedEventType   = containedEventType;
     _optionalStateKey     = optionalStateKey;
     _optionalStateFactory = optionalStateFactory;
     _optionalAgent        = optionalAgent;
 }
 public ExprAggMultiFunctionSortedMinMaxByNodeFactory(ExprAggMultiFunctionSortedMinMaxByNode parent,
     AggregationAccessor accessor, Type accessorResultType, EventType containedEventType,
     AggregationStateKey optionalStateKey, SortedAggregationStateFactoryFactory optionalStateFactory,
     AggregationAgent optionalAgent)
 {
     Parent = parent;
     Accessor = accessor;
     ResultType = accessorResultType;
     ContainedEventType = containedEventType;
     OptionalStateKey = optionalStateKey;
     OptionalStateFactory = optionalStateFactory;
     AggregationStateAgent = optionalAgent;
 }
コード例 #3
0
        private ExprAggMultiFunctionSortedMinMaxByNodeFactory HandleIntoTable(ExprValidationContext validationContext)
        {
            int streamNum;
            var positionalParams = PositionalParams;

            if (positionalParams.Length == 0 ||
                (positionalParams.Length == 1 && positionalParams[0] is ExprWildcard))
            {
                ExprAggMultiFunctionUtil.ValidateWildcardStreamNumbers(
                    validationContext.StreamTypeService, AggregationFunctionName);
                streamNum = 0;
            }
            else if (positionalParams.Length == 1 && positionalParams[0] is ExprStreamUnderlyingNode)
            {
                streamNum = ExprAggMultiFunctionUtil.ValidateStreamWildcardGetStreamNum(positionalParams[0]);
            }
            else if (positionalParams.Length > 0)
            {
                throw new ExprValidationException("When specifying into-table a sort expression cannot be provided");
            }
            else
            {
                streamNum = 0;
            }

            var containedType      = validationContext.StreamTypeService.EventTypes[streamNum];
            var componentType      = containedType.UnderlyingType;
            var accessorResultType = componentType;
            AggregationAccessor accessor;

            if (!_sortedwin)
            {
                accessor = new AggregationAccessorMinMaxByNonTable(_max);
            }
            else
            {
                accessor           = new AggregationAccessorSortedNonTable(_max, componentType);
                accessorResultType = TypeHelper.GetArrayType(accessorResultType);
            }

            AggregationAgent agent = AggregationAgentDefault.INSTANCE;

            if (streamNum != 0)
            {
                agent = new AggregationAgentRewriteStream(streamNum);
            }

            return(new ExprAggMultiFunctionSortedMinMaxByNodeFactory(
                       this, accessor, accessorResultType, containedType, null, null, agent));
        }