示例#1
0
 public ExprMinMaxAggrNode(bool distinct, MinMaxTypeEnum minMaxTypeEnum, bool isFFunc, bool isEver)
     : base(distinct)
 {
     _minMaxTypeEnum = minMaxTypeEnum;
     _isFFunc        = isFFunc;
     _isEver         = isEver;
 }
示例#2
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="distinct">indicator whether distinct values of all values min/max</param>
 /// <param name="minMaxTypeEnum">enum for whether to minimum or maximum compute</param>
 /// <param name="hasFilter">if set to <c>true</c> [has filter].</param>
 /// <param name="isEver">if set to <c>true</c> [is ever].</param>
 public ExprMinMaxAggrNode(bool distinct, MinMaxTypeEnum minMaxTypeEnum, bool hasFilter, bool isEver)
     : base(distinct)
 {
     _minMaxTypeEnum = minMaxTypeEnum;
     _hasFilter      = hasFilter;
     _isEver         = isEver;
 }
示例#3
0
        private ExprMinMaxAggrNode MakeNode(MinMaxTypeEnum minMaxType, Object value, Type type)
        {
            ExprMinMaxAggrNode minMaxNode = new ExprMinMaxAggrNode(false, minMaxType, false, false);

            minMaxNode.AddChildNode(new SupportExprNode(value, type));
            SupportExprNodeFactory.Validate3Stream(minMaxNode);
            return(minMaxNode);
        }
        public AggregationPortableValidationMinMax(
            bool distinct,
            bool hasFilter,
            Type inputValueType,
            MinMaxTypeEnum minMax,
            bool isUnbound)
            : base(distinct, hasFilter, inputValueType)

        {
            MinMax = minMax;
            IsUnbound = isUnbound;
        }
示例#5
0
 /// <summary>
 ///     Returns textual representation of enum.
 /// </summary>
 /// <returns>text for enum</returns>
 public static string GetExpressionText(this MinMaxTypeEnum value)
 {
     switch (value)
     {
         case MinMaxTypeEnum.MAX:
             return "max";
         case MinMaxTypeEnum.MIN:
             return "min";
         default:
             throw new ArgumentOutOfRangeException(nameof(value), value, null);
     }
 }
示例#6
0
        public static string GetExpressionText(this MinMaxTypeEnum @enum)
        {
            switch (@enum)
            {
            case MinMaxTypeEnum.MAX:
                return("max");

            case MinMaxTypeEnum.MIN:
                return("min");
            }

            throw new ArgumentException("invalid value for enum");
        }
示例#7
0
        private AggregationMethod MakeMinMaxAggregator(
            MinMaxTypeEnum minMaxTypeEnum, Type targetType,
            bool isHasDataWindows, bool hasFilter)
        {
            if (!hasFilter) {
                if (!isHasDataWindows) {
                    return new AggregatorMinMaxEver(minMaxTypeEnum);
                }
                return new AggregatorMinMax(minMaxTypeEnum);
            }

            if (!isHasDataWindows) {
                return new AggregatorMinMaxEverFilter(minMaxTypeEnum);
            }
            return new AggregatorMinMaxFilter(minMaxTypeEnum);
        }
示例#8
0
 public AggregatorMinMaxEverFilter(MinMaxTypeEnum minMaxTypeEnum, Type returnType)
     : base(minMaxTypeEnum, returnType)
 {
 }
 public AggregationMethod MakeMinMaxAggregator(int agentInstanceId, int groupId, int aggregationId, MinMaxTypeEnum minMaxTypeEnum, Type targetType, bool isHasDataWindows, bool hasFilter)
 {
     if (!hasFilter)
     {
         if (!isHasDataWindows)
         {
             return(new AggregatorMinMaxEver(minMaxTypeEnum, targetType));
         }
         return(new AggregatorMinMax(minMaxTypeEnum, targetType));
     }
     else
     {
         if (!isHasDataWindows)
         {
             return(new AggregatorMinMaxEverFilter(minMaxTypeEnum, targetType));
         }
         return(new AggregatorMinMaxFilter(minMaxTypeEnum, targetType));
     }
 }
示例#10
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="minMaxTypeEnum">type of compare</param>
 public ExprMinMaxRowNode(MinMaxTypeEnum minMaxTypeEnum)
 {
     this.minMaxTypeEnum = minMaxTypeEnum;
 }
示例#11
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="minMaxTypeEnum">- enum indicating to return minimum or maximum values</param>
 public AggregatorMinMaxEver(MinMaxTypeEnum minMaxTypeEnum)
 {
     _minMaxTypeEnum = minMaxTypeEnum;
 }
示例#12
0
 /// <summary>Ctor.  </summary>
 /// <param name="minMaxTypeEnum">enum indicating to return minimum or maximum values</param>
 /// <param name="returnType">is the value type returned by aggregator</param>
 public AggregatorMinMaxEver(MinMaxTypeEnum minMaxTypeEnum, Type returnType)
 {
     _minMaxTypeEnum = minMaxTypeEnum;
     _returnType     = returnType;
 }
示例#13
0
 /// <summary>Ctor.  </summary>
 /// <param name="minMaxTypeEnum">enum indicating to return minimum or maximum values</param>
 /// <param name="returnType">is the value type returned by aggregator</param>
 public AggregatorMinMax(MinMaxTypeEnum minMaxTypeEnum)
 {
     _minMaxTypeEnum = minMaxTypeEnum;
     _refSet         = new SortedRefCountedSet <Object>();
 }
示例#14
0
 public AggregatorMinMaxFilter(MinMaxTypeEnum minMaxTypeEnum)
     : base(minMaxTypeEnum)
 {
 }