public static class Window.Group extends Object
The specification is defined by an upper and lower bound, and also has zero or more partitioning columns.
A window is either logical or physical. A physical window is measured in terms of row count. A logical window is measured in terms of rows within a certain distance from the current sort key.
For example:
ROWS BETWEEN 10 PRECEDING and 5 FOLLOWING is a physical
window with an upper and lower bound;
RANGE BETWEEN INTERVAL '1' HOUR PRECEDING AND UNBOUNDED
FOLLOWING is a logical window with only a lower bound;
RANGE INTERVAL '10' MINUTES PRECEDING (which is
equivalent to RANGE BETWEEN INTERVAL '10' MINUTES PRECEDING AND
CURRENT ROW) is a logical window with an upper and lower bound.
| Modifier and Type | Field and Description |
|---|---|
com.google.common.collect.ImmutableList<Window.RexWinAggCall> |
aggCalls
List of
Window.RexWinAggCall
objects, each of which is a call to a
SqlAggFunction. |
boolean |
isRows |
ImmutableBitSet |
keys |
RexWindowBound |
lowerBound |
RelCollation |
orderKeys |
RexWindowBound |
upperBound |
| Constructor and Description |
|---|
Window.Group(ImmutableBitSet keys,
boolean isRows,
RexWindowBound lowerBound,
RexWindowBound upperBound,
RelCollation orderKeys,
List<Window.RexWinAggCall> aggCalls) |
| Modifier and Type | Method and Description |
|---|---|
RelCollation |
collation() |
boolean |
equals(Object obj) |
List<AggregateCall> |
getAggregateCalls(Window windowRel)
Presents a view of the
Window.RexWinAggCall list as a list of
AggregateCall. |
int |
hashCode() |
boolean |
isAlwaysNonEmpty()
Returns if the window is guaranteed to have rows.
|
String |
toString() |
public final ImmutableBitSet keys
public final boolean isRows
public final RexWindowBound lowerBound
public final RexWindowBound upperBound
public final RelCollation orderKeys
public final com.google.common.collect.ImmutableList<Window.RexWinAggCall> aggCalls
Window.RexWinAggCall
objects, each of which is a call to a
SqlAggFunction.public Window.Group(ImmutableBitSet keys, boolean isRows, RexWindowBound lowerBound, RexWindowBound upperBound, RelCollation orderKeys, List<Window.RexWinAggCall> aggCalls)
public RelCollation collation()
public boolean isAlwaysNonEmpty()
SqlWindow.isAlwaysNonEmpty(),
SqlOperatorBinding.getGroupCount(),
SqlValidatorImpl.resolveWindow(org.apache.calcite.sql.SqlNode, org.apache.calcite.sql.validate.SqlValidatorScope, boolean)public List<AggregateCall> getAggregateCalls(Window windowRel)
Window.RexWinAggCall list as a list of
AggregateCall.Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.