RollingAggregation#

public final class RollingAggregation#

An aggregation that can be used on rolling windows.

Method Summary

argMax()

Index of max element.

argMin()

Index of min element.

collectList()

Collect the values into a list.

collectList(NullPolicy nullPolicy)

Collect the values into a list.

collectSet()

Collect the values into a set.

collectSet(NullPolicy nullPolicy, NullEquality nullEquality, NaNEquality nanEquality)

Collect the values into a set.

count()

Count number of valid, a.k.a.

count(NullPolicy nullPolicy)

Count number of elements.

equals(Object other)

hashCode()

lag(int offset)

In a rolling window return the value offset entries behind or null if it is outside of the window.

lag(int offset, ColumnVector defaultOutput)

In a rolling window return the value offset entries behind or the corresponding value from defaultOutput if it is outside of the window.

lead(int offset)

In a rolling window return the value offset entries ahead or null if it is outside of the window.

lead(int offset, ColumnVector defaultOutput)

In a rolling window return the value offset entries ahead or the corresponding value from defaultOutput if it is outside of the window.

max()

Rolling Window Max.

mean()

Arithmetic Mean.

min()

Rolling Window Min.

nth(int n, NullPolicy nullPolicy)

Select the nth element from a specified window.

onColumn(int columnIndex)

Add a column to the Aggregation so it can be used on a specific column of data.

rowNumber()

Get the row number.

standardDeviation()

Rolling Window Standard Deviation with 1 as delta degrees of freedom(DDOF).

standardDeviation(int ddof)

Rolling Window Standard Deviation with configurable delta degrees of freedom(DDOF).

sum()

Rolling Window Sum.

Methods

public RollingAggregationOnColumn onColumn(int columnIndex)#

Add a column to the Aggregation so it can be used on a specific column of data.

Parameters:

columnIndex – the index of the column to operate on.

public int hashCode()#
public boolean equals(Object other)#

Static Methods

public static RollingAggregation sum()#

Rolling Window Sum.

public static RollingAggregation min()#

Rolling Window Min.

public static RollingAggregation max()#

Rolling Window Max.

public static RollingAggregation standardDeviation()#

Rolling Window Standard Deviation with 1 as delta degrees of freedom(DDOF).

public static RollingAggregation standardDeviation(int ddof)#

Rolling Window Standard Deviation with configurable delta degrees of freedom(DDOF).

public static RollingAggregation count()#

Count number of valid, a.k.a.

non-null, elements.

public static RollingAggregation count(NullPolicy nullPolicy)#

Count number of elements.

Parameters:

nullPolicy – INCLUDE if nulls should be counted. EXCLUDE if only non-null values should be counted.

public static RollingAggregation mean()#

Arithmetic Mean.

public static RollingAggregation argMax()#

Index of max element.

public static RollingAggregation argMin()#

Index of min element.

public static RollingAggregation rowNumber()#

Get the row number.

public static RollingAggregation lead(int offset)#

In a rolling window return the value offset entries ahead or null if it is outside of the window.

public static RollingAggregation lead(
int offset,
ColumnVector defaultOutput
)#

In a rolling window return the value offset entries ahead or the corresponding value from defaultOutput if it is outside of the window.

Note that this does not take any ownership of defaultOutput and the caller mush ensure that defaultOutput remains valid during the life time of this aggregation operation.

public static RollingAggregation lag(int offset)#

In a rolling window return the value offset entries behind or null if it is outside of the window.

public static RollingAggregation lag(
int offset,
ColumnVector defaultOutput
)#

In a rolling window return the value offset entries behind or the corresponding value from defaultOutput if it is outside of the window.

Note that this does not take any ownership of defaultOutput and the caller mush ensure that defaultOutput remains valid during the life time of this aggregation operation.

public static RollingAggregation collectList()#

Collect the values into a list.

Nulls will be skipped.

public static RollingAggregation collectList(NullPolicy nullPolicy)#

Collect the values into a list.

Parameters:

nullPolicy – Indicates whether to include/exclude nulls during collection.

public static RollingAggregation collectSet()#

Collect the values into a set.

All null values will be excluded, and all nan values are regarded as unique instances.

public static RollingAggregation 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.

public static RollingAggregation nth(int n, NullPolicy nullPolicy)#

Select the nth element from a specified window.

Parameters:
  • n – Indicates the index of the element to be selected from the window

  • nullPolicy – Indicates whether null elements are to be skipped, or not