Package ai.rapids.cudf
Class ReductionAggregation
java.lang.Object
ai.rapids.cudf.ReductionAggregation
An aggregation that can be used for a reduce.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReductionAggregation
all()
All reduction.static ReductionAggregation
any()
Any reduction.static ReductionAggregation
bitAnd()
Bitwise AND aggregation, computing the bitwise AND of all non-null values.static ReductionAggregation
bitOr()
Bitwise OR aggregation, computing the bitwise OR of all non-null values.static ReductionAggregation
bitXor()
Bitwise XOR aggregation, computing the bitwise XOR of all non-null values.static ReductionAggregation
static ReductionAggregation
collectList
(NullPolicy nullPolicy) Collect the values into a list.static ReductionAggregation
Collect the values into a set.static ReductionAggregation
collectSet
(NullPolicy nullPolicy, NullEquality nullEquality, NaNEquality nanEquality) Collect the values into a set.static ReductionAggregation
createTDigest
(int delta) tDigest reduction.boolean
int
hashCode()
static ReductionAggregation
Create HistogramAggregation, computing the frequencies for each unique row.static ReductionAggregation
hostUDF
(HostUDFWrapper wrapper) Execute a reduction using a host-side user-defined function (UDF).static ReductionAggregation
max()
Max Aggregationstatic ReductionAggregation
mean()
Arithmetic mean reduction.static ReductionAggregation
median()
Median reduction.static ReductionAggregation
Create MergeHistogramAggregation, to merge multiple histograms.static ReductionAggregation
Merge the partial lists produced by multiple CollectListAggregations.static ReductionAggregation
Merge the partial sets produced by multiple CollectSetAggregations.static ReductionAggregation
mergeSets
(NullEquality nullEquality, NaNEquality nanEquality) Merge the partial sets produced by multiple CollectSetAggregations.static ReductionAggregation
mergeTDigest
(int delta) tDigest merge reduction.static ReductionAggregation
min()
Min Aggregationstatic ReductionAggregation
nth
(int offset) Get the nth, non-null, element in a group.static ReductionAggregation
nth
(int offset, NullPolicy nullPolicy) Get the nth element in a group.static ReductionAggregation
nunique()
Number of unique, non-null, elements.static ReductionAggregation
nunique
(NullPolicy nullPolicy) Number of unique elements.static ReductionAggregation
product()
Product Aggregation.static ReductionAggregation
quantile
(double... quantiles) Aggregate to compute the specified quantiles.static ReductionAggregation
quantile
(QuantileMethod method, double... quantiles) Aggregate to compute various quantiles.static ReductionAggregation
Standard deviation aggregation with 1 as the delta degrees of freedom.static ReductionAggregation
standardDeviation
(int ddof) Standard deviation aggregation.static ReductionAggregation
sum()
Sum Aggregationstatic ReductionAggregation
Sum of squares reduction.static ReductionAggregation
variance()
Variance aggregation with 1 as the delta degrees of freedom.static ReductionAggregation
variance
(int ddof) Variance aggregation.
-
Method Details
-
hashCode
public int hashCode() -
equals
-
sum
Sum Aggregation -
product
Product Aggregation. -
min
Min Aggregation -
max
Max Aggregation -
any
Any reduction. Produces a true or 1, depending on the output type, if any of the elements in the range are true or non-zero, otherwise produces a false or 0. Null values are skipped. -
all
All reduction. Produces true or 1, depending on the output type, if all of the elements in the range are true or non-zero, otherwise produces a false or 0. Null values are skipped. -
sumOfSquares
Sum of squares reduction. -
mean
Arithmetic mean reduction. -
variance
Variance aggregation with 1 as the delta degrees of freedom. -
variance
Variance aggregation.- Parameters:
ddof
- delta degrees of freedom. The divisor used in calculation of variance isN - ddof
, where N is the population size.
-
standardDeviation
Standard deviation aggregation with 1 as the delta degrees of freedom. -
standardDeviation
Standard deviation aggregation.- Parameters:
ddof
- delta degrees of freedom. The divisor used in calculation of std isN - ddof
, where N is the population size.
-
median
Median reduction. -
quantile
Aggregate to compute the specified quantiles. Uses linear interpolation by default. -
quantile
Aggregate to compute various quantiles. -
nunique
Number of unique, non-null, elements. -
nunique
Number of unique elements.- Parameters:
nullPolicy
- INCLUDE if nulls should be counted else EXCLUDE. If nulls are counted they compare as equal so multiple null values in a range would all only increase the count by 1.
-
nth
Get the nth, non-null, element in a group.- Parameters:
offset
- the offset to look at. Negative numbers go from the end of the group. Any value outside of the group range results in a null.
-
nth
Get the nth element in a group.- Parameters:
offset
- the offset to look at. Negative numbers go from the end of the group. Any value outside of the group range results in a null.nullPolicy
- INCLUDE if nulls should be included in the aggregation or EXCLUDE if they should be skipped.
-
createTDigest
tDigest reduction. -
mergeTDigest
tDigest merge reduction. -
collectList
-
collectList
Collect the values into a list.- Parameters:
nullPolicy
- Indicates whether to include/exclude nulls during collection.
-
collectSet
Collect the values into a set. All null values will be excluded, and all NaN values are regarded as unique instances. -
collectSet
public static ReductionAggregation collectSet(NullPolicy nullPolicy, NullEquality nullEquality, NaNEquality nanEquality) Collect the values into a set.- Parameters:
nullPolicy
- Indicates whether to include/exclude nulls during collection.nullEquality
- Flag to specify whether null entries within each list should be considered equal.nanEquality
- Flag to specify whether NaN values in floating point column should be considered equal.
-
mergeLists
Merge the partial lists produced by multiple CollectListAggregations. NOTICE: The partial lists to be merged should NOT include any null list element (but can include null list entries). -
mergeSets
Merge the partial sets produced by multiple CollectSetAggregations. Each null/NaN value will be regarded as a unique instance. -
mergeSets
Merge the partial sets produced by multiple CollectSetAggregations.- Parameters:
nullEquality
- Flag to specify whether null entries within each list should be considered equal.nanEquality
- Flag to specify whether NaN values in floating point column should be considered equal.
-
hostUDF
Execute a reduction using a host-side user-defined function (UDF).- Parameters:
wrapper
- The wrapper for the native host UDF instance.- Returns:
- A new ReductionAggregation instance
-
histogram
Create HistogramAggregation, computing the frequencies for each unique row.- Returns:
- A structs column in which the first child stores unique rows from the input and the second child stores their corresponding frequencies.
-
mergeHistogram
Create MergeHistogramAggregation, to merge multiple histograms.- Returns:
- A new histogram in which the frequencies of the unique rows are sum up.
-
bitAnd
Bitwise AND aggregation, computing the bitwise AND of all non-null values. -
bitOr
Bitwise OR aggregation, computing the bitwise OR of all non-null values. -
bitXor
Bitwise XOR aggregation, computing the bitwise XOR of all non-null values.
-