Package org.apache.flink.table.api
Class Over
- java.lang.Object
-
- org.apache.flink.table.api.Over
-
@PublicEvolving public final class Over extends Object
Helper class for creating an over window. Similar to SQL, over window aggregates compute an aggregate for each input row over a range of its neighboring rows.Java Example:
Over.partitionBy("a").orderBy("rowtime").preceding("unbounded_range").as("w")
Scala Example:
Over partitionBy 'a orderBy 'rowtime preceding UNBOUNDED_RANGE as 'w
-
-
Constructor Summary
Constructors Constructor Description Over()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OverWindowPartitionedOrdered
orderBy(org.apache.flink.table.expressions.Expression orderBy)
Specifies the time attribute on which rows are ordered.static OverWindowPartitioned
partitionBy(org.apache.flink.table.expressions.Expression... partitionBy)
Partitions the elements on some partition keys.
-
-
-
Method Detail
-
partitionBy
public static OverWindowPartitioned partitionBy(org.apache.flink.table.expressions.Expression... partitionBy)
Partitions the elements on some partition keys.Each partition is individually sorted and aggregate functions are applied to each partition separately.
- Parameters:
partitionBy
- list of field references- Returns:
- an over window with defined partitioning
-
orderBy
public static OverWindowPartitionedOrdered orderBy(org.apache.flink.table.expressions.Expression orderBy)
Specifies the time attribute on which rows are ordered.For streaming tables, reference a rowtime or proctime time attribute here to specify the time mode.
For batch tables, refer to a timestamp or long attribute.
- Parameters:
orderBy
- field reference- Returns:
- an over window with defined order
-
-