Class RollingAggregation

java.lang.Object
ai.rapids.cudf.RollingAggregation

public final class RollingAggregation extends Object
An aggregation that can be used on rolling windows.
  • Method Details

    • onColumn

      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.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • sum

      public static RollingAggregation sum()
      Rolling Window Sum
    • min

      public static RollingAggregation min()
      Rolling Window Min
    • max

      public static RollingAggregation max()
      Rolling Window Max
    • standardDeviation

      public static RollingAggregation standardDeviation()
      Rolling Window Standard Deviation with 1 as delta degrees of freedom(DDOF).
    • standardDeviation

      public static RollingAggregation standardDeviation(int ddof)
      Rolling Window Standard Deviation with configurable delta degrees of freedom(DDOF).
    • count

      public static RollingAggregation count()
      Count number of valid, a.k.a. non-null, elements.
    • count

      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.
    • mean

      public static RollingAggregation mean()
      Arithmetic Mean
    • argMax

      public static RollingAggregation argMax()
      Index of max element.
    • argMin

      public static RollingAggregation argMin()
      Index of min element.
    • rowNumber

      public static RollingAggregation rowNumber()
      Get the row number.
    • lead

      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.
    • lead

      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.
    • lag

      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.
    • lag

      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.
    • collectList

      public static RollingAggregation collectList()
      Collect the values into a list. Nulls will be skipped.
    • collectList

      public static RollingAggregation collectList(NullPolicy nullPolicy)
      Collect the values into a list.
      Parameters:
      nullPolicy - Indicates whether to include/exclude nulls during collection.
    • collectSet

      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.
    • collectSet

      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.
    • nth

      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