public class WindowedTable extends Object
Constructor and Description |
---|
WindowedTable(Table table,
Window window) |
Modifier and Type | Method and Description |
---|---|
WindowGroupedTable |
groupBy(scala.collection.Seq<Expression> fields)
Groups the elements by a mandatory window and one or more optional grouping attributes.
|
WindowGroupedTable |
groupBy(String fields)
Groups the elements by a mandatory window and one or more optional grouping attributes.
|
Table |
table() |
Window |
window() |
public Table table()
public Window window()
public WindowGroupedTable groupBy(scala.collection.Seq<Expression> fields)
If no additional grouping attribute is specified and if the input is a streaming table, the aggregation will be performed by a single task, i.e., with parallelism 1.
Aggregations are performed per group and defined by a subsequent select(...)
clause similar
to SQL SELECT-GROUP-BY query.
Example:
tab.window([window] as 'w)).groupBy('w, 'key).select('key, 'value.avg)
fields
- (undocumented)public WindowGroupedTable groupBy(String fields)
If no additional grouping attribute is specified and if the input is a streaming table, the aggregation will be performed by a single task, i.e., with parallelism 1.
Aggregations are performed per group and defined by a subsequent select(...)
clause similar
to SQL SELECT-GROUP-BY query.
Example:
tab.window([window].as("w")).groupBy("w, key").select("key, value.avg")
fields
- (undocumented)Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.