fun groupBy(range: Pair<List<Any>, List<Any>>): List<Pair<List<Any>, D?>>
(source)
Algorithm for performing a group-by range query on a DB-tree T.
This algorithm can be invoked if and only if the key type is a pair (or a tuple). The key type must be decomposable in the form <X,Y>, where X corresponds to the group type, and Y to the actual keyring system for each group. The algorithm accepts as input the range <y',y">. Neither y' nor y" must be explicitly contained in any T's group. The algorithm computes the aggregate value for the values of all keys between y' and y", for each group in T.
Return
the list of aggregate results of the group-by range query, one for each group.