public static interface UserDefinedWindowFunctionAdapter.Partition
Partition
provides a view on a set of records that a window
function is applied on. For each record in the set, a UserDefinedWindowFunctionAdapter.PartitionEntry
is created which encapsulates all the window function arguments derived from
that particular record. The window function thus only may operate on those
argument values but does not get full access to the underlying record.
If the window functions OVER
clause did not specify a PARTITION BY ...
clause, the window function will only operate on one single Partition
which is
backed by the complete record set. Otherwise, a Partition
object will
be created for each partition key.
The entries of a partition occur in the same order as they occur in the backing record set.
If the window functions OVER
clause included an ORDER BY ...
clause,
this determines the order of the entries and entries will be comparable w.r.t. this
order.
Modifier and Type | Method and Description |
---|---|
UserDefinedWindowFunctionAdapter.PartitionEntry |
get(int i)
Returns the i-th
UserDefinedWindowFunctionAdapter.PartitionEntry of this partition. |
Iterator<UserDefinedWindowFunctionAdapter.PartitionEntry> |
iterator(int from,
int to)
Returns an iterator over this partitions entries starting at index
from (inclusive)
to index to (exclusive). |
int |
size()
Returns the number of entries of this partition.
|
UserDefinedWindowFunctionAdapter.PartitionEntry get(int i)
UserDefinedWindowFunctionAdapter.PartitionEntry
of this partition.
i
- the index of the entry to returnUserDefinedWindowFunctionAdapter.PartitionEntry
of this partitionint size()
Iterator<UserDefinedWindowFunctionAdapter.PartitionEntry> iterator(int from, int to)
from
(inclusive)
to index to
(exclusive).
from
- the index from which on the iterator will return the partitions entries (inclusive)to
- the index up to which the iterator will return the partitions entries (exclusive)