net.sf.farrago.fennel.rel
Class FennelWindowRel.Window
java.lang.Object
net.sf.farrago.fennel.rel.FennelWindowRel.Window
- Enclosing class:
- FennelWindowRel
public static class FennelWindowRel.Window
- extends Object
A Window is a range of input rows, defined by an upper and lower bound.
It also contains a list of FennelWindowRel.Partition
objects.
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.
partitionList
private final List<FennelWindowRel.Partition> partitionList
- The partitions which make up this window.
physical
final boolean physical
lowerBound
final SqlNode lowerBound
upperBound
final SqlNode upperBound
orderKeys
public final Integer[] orderKeys
digest
private String digest
FennelWindowRel.Window
FennelWindowRel.Window(boolean physical,
SqlNode lowerBound,
SqlNode upperBound,
Integer[] ordinals)
toString
public String toString()
- Overrides:
toString
in class Object
computeDigest
public void computeDigest()
computeDigest
private void computeDigest(StringBuilder buf)
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
lookupOrCreatePartition
public FennelWindowRel.Partition lookupOrCreatePartition(Integer[] partitionKeys)
getPartitionList
public List<FennelWindowRel.Partition> getPartitionList()