public abstract class Window extends Object
Window groups rows based on time or row-count intervals. It is a general way to group the elements, which is very helpful for both groupby-aggregations and over-aggregations to compute aggregates on groups of elements.
Infinite streaming tables can only be grouped into time or row intervals. Hence window grouping is required to apply aggregations on streaming tables.
For finite batch tables, window provides shortcuts for time-based groupBy.
Constructor and Description |
---|
Window() |
Modifier and Type | Method and Description |
---|---|
scala.Option<Expression> |
alias() |
Window |
as(Expression alias)
Assigns an alias for this window that the following
groupBy() and select() clause can
refer to. |
Window |
as(String alias)
Assigns an alias for this window that the following
groupBy() and select() clause can
refer to. |
abstract LogicalWindow |
toLogicalWindow()
Converts an API class to a logical window for planning.
|
public scala.Option<Expression> alias()
public abstract LogicalWindow toLogicalWindow()
public Window as(Expression alias)
groupBy()
and select()
clause can
refer to. select()
statement can access window properties such as window start or end time.
alias
- alias for this windowCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.