Package ai.rapids.cudf
Class WindowOptions.Builder
java.lang.Object
ai.rapids.cudf.WindowOptions.Builder
- Enclosing class:
- WindowOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Set the relative number following the current row for range windowminPeriods(int minPeriods) Set the minimum number of observation required to evaluate an element.orderByColumnIndex(int index) orderByColumns(int[] indices, boolean[] ascending, boolean[] nullsFirst) Specify multiple order-by columns for a multi-column RANGE window.Set the relative number preceding the current row for range windowDeprecated.Use orderByAscending()timestampColumnIndex(int index) Deprecated.Use orderByColumnIndex(int index)Deprecated.Use orderByDescending()window(ColumnVector precedingCol, ColumnVector followingCol) Set the size of the window, one entry per row.Set the size of the range window.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
minPeriods
Set the minimum number of observation required to evaluate an element. If there are not enough elements for a given window a null is placed in the result instead. -
window
Set the size of the window, one entry per row. This does not take ownership of the columns passed in so you have to be sure that the lifetime of the column outlives this operation.- Parameters:
precedingCol- the number of rows in the window before and including the current row. precedingCol will be live outside of WindowOptions.followingCol- the number of rows in the window after the current row. followingCol will be live outside of WindowOptions.
-
window
Set the size of the range window. This does not take ownership of the scalars passed in so you have to be sure that the lifetime of the scalars outlives this operation.- Parameters:
precedingScalar- the number of rows in the window before and including the current row. precedingScalar will be live outside of WindowOptions.followingScalar- the number of rows in the window after the current row. followingScalar will be live outside of WindowOptions.
-
timestampColumnIndex
Deprecated.Use orderByColumnIndex(int index) -
orderByColumnIndex
-
orderByColumns
public WindowOptions.Builder orderByColumns(int[] indices, boolean[] ascending, boolean[] nullsFirst) Specify multiple order-by columns for a multi-column RANGE window. All three arrays must be non-empty and of equal length; entryidescribes the i-th order-by column.Multi-column RANGE windows support only peer-frame bounds (
UNBOUNDEDandCURRENT_ROW); bounded scalar ranges are not supported across multiple order-by columns. Unlike the single-column order-by methods, null placement is not deduced from the data and must be stated explicitly here. This API is mutually exclusive with the single-column order-by setters; mixing them in one builder is rejected bybuild().- Parameters:
indices- input-table column indices of the order-by columns, in order.ascending- per-column sort direction (true == ascending).nullsFirst- per-column null placement (true == nulls ordered before non-null values).
-
timestampAscending
Deprecated.Use orderByAscending() -
orderByAscending
-
orderByDescending
-
timestampDescending
Deprecated.Use orderByDescending() -
currentRowPreceding
-
currentRowFollowing
-
unboundedPreceding
-
unboundedFollowing
-
preceding
Set the relative number preceding the current row for range window- Returns:
- this for chaining
-
following
Set the relative number following the current row for range window- Returns:
- this for chaining
-
build
-