NumberRollingColumn
public class RollingColumn extends Object
Modifier and Type | Field | Description |
---|---|---|
protected Column<?> |
column |
The column providing the data for the rolling calculation
|
protected int |
window |
The size of the rolling window
|
Constructor | Description |
---|---|
RollingColumn(Column<?> column,
int window) |
Constructs a rolling column based on calculations on a sliding window of
window rows of
data from the given column |
Modifier and Type | Method | Description |
---|---|---|
<INCOL extends Column<?>,OUT> |
calc(AggregateFunction<INCOL,OUT> function) |
Performs the calculation and returns a new column containing the results
|
protected String |
generateNewColumnName(AggregateFunction<?,?> function) |
Generates a name for the column based on the name of the original column and the function used
in the calculation
|
protected final Column<?> column
protected final int window
public RollingColumn(Column<?> column, int window)
window
rows of
data from the given columnprotected String generateNewColumnName(AggregateFunction<?,?> function)
public <INCOL extends Column<?>,OUT> Column<?> calc(AggregateFunction<INCOL,OUT> function)
Copyright © 2022. All rights reserved.