.NET Client Documentation
5.1.1
Search Results for

    Show / Hide Table of Contents

    Aggregators Class

    Namespace: Hazelcast.Aggregation
    Assembly: Hazelcast.Net.dll

    Creates IAggregator<TResult> instances.

    public static class Aggregators
    Inheritance
    Object
    Aggregators
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Remarks

    Min/Max/Average aggregators are type specific, so an IntegerAvg() aggregator expects all elements to be integers. There is no conversion executed while accumulating, so if there is any other type met an exception will be thrown.
    In order to operate on a generic Number type use the FixedPointSum(String), FloatingPointSum(String) and NumberAvg(String) aggregators. All of them will convert the given number to either Long or Double during the accumulation phase. It will result in a lot of allocations since each number has to be converted, but it enables the user to operate on the whole family of numbers. It is especially useful if the numbers given to the aggregators may not be of one type only.
    The attributePath given in the factory method allows the aggregator to operate on the value extracted by navigating to the given attributePath on each object that has been returned from a query. The attribute path may be simple, e.g. "name", or nested "address.city".
    If an aggregator does not accept null values pass a predicate to the aggregate call that will filter them out.
    If the input value or the extracted value is a collection it won't be "unfolded" - so for example count aggregation on "person.postalCodes" will return 1 for each input object and not the size of the collection. In order to calculate the size of the collection use the [any] operator, e.g. "person.postalCodes[any]".

    Methods

    BigIntegerSum()

    An aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only BigInteger input values.

    BigIntegerSum(String)

    an aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only BigInteger input values.

    Count()

    Counts input values (accepts nulls).

    Count(String)

    Counts input values (accepts nulls).

    DoubleAvg()

    Averages Double input values (does not accept nulls).

    DoubleAvg(String)

    Averages Double input values (does not accept nulls).

    DoubleSum()

    an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only double input values.

    DoubleSum(String)

    An aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only double input values.

    FixedPointSum()

    an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts float or double input values.

    FixedPointSum(String)

    An aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts float or double input values.

    FloatingPointSum()

    an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts float or double input values.

    FloatingPointSum(String)

    An aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts float or double input values.

    IntegerAvg()

    an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts only int input values

    IntegerAvg(String)

    an aggregator that calculates the average of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only int input values

    IntegerSum()

    an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only int input values.

    IntegerSum(String)

    An aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only int input values.

    LongAvg()

    an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts only long input values

    LongAvg(String)

    an aggregator that calculates the average of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only long input values

    LongSum()

    an aggregator that calculates the sum of the input values. Does NOT accept null input values. Accepts only long input values.

    LongSum(String)

    An aggregator that calculates the sum of the input values extracted from the given attributePath. Does NOT accept null input values nor null extracted values. Accepts only long input values.

    Max<TResult>()

    an aggregator that calculates the max of the input values. Accepts null input values

    Max<TResult>(String)

    an aggregator that calculates the max of the input values extracted from the given attributePath. Accepts null input values and null extracted values.

    Min<TResult>()

    an aggregator that calculates the min of the input values. Accepts null input values

    Min<TResult>(String)

    an aggregator that calculates the min of the input values extracted from the given attributePath. Accepts null input values and null extracted values.

    NumberAvg()

    an aggregator that calculates the average of the input values. Does NOT accept null input values. Accepts float or double input values.

    NumberAvg(String)

    an aggregator that calculates the average of the input values. Does NOT accept null input values nor null extracted values. Accepts float or double input values.

    In This Article
    Back to top Copyright © 2010-2022 Hazelcast, Inc. All rights reserved.
    Generated by DocFX.