public interface VectorGrouper extends Closeable
Grouper, but vectorized. Keys are always memory regions, so there is no generic type parameter
KeyType.
This interface is designed such that an implementation can implement both Grouper and VectorGrouper. Of course, it would generally only make sense for a particular instance to be called with one set of functionality or the other.
| Modifier and Type | Method and Description |
|---|---|
AggregateResult |
aggregateVector(org.apache.datasketches.memory.Memory keySpace,
int startRow,
int endRow)
Aggregate the current vector of rows from "startRow" to "endRow" using the provided keys.
|
void |
close()
Close the grouper and release associated resources.
|
void |
initVectorized(int maxVectorSize)
Initialize the grouper.
|
CloseableIterator<Grouper.Entry<org.apache.datasketches.memory.Memory>> |
iterator()
Iterate through entry buckets.
|
void |
reset()
Reset the grouper to its initial state.
|
void initVectorized(int maxVectorSize)
aggregateVector(org.apache.datasketches.memory.Memory, int, int).AggregateResult aggregateVector(org.apache.datasketches.memory.Memory keySpace, int startRow, int endRow)
keySpace - array holding keys, chunked into ints. First (endRow - startRow) keys must be valid.startRow - row to start at (inclusive).endRow - row to end at (exclusive).void reset()
void close()
close in interface AutoCloseableclose in interface CloseableCloseableIterator<Grouper.Entry<org.apache.datasketches.memory.Memory>> iterator()
Memory object in native byte order.
After you are done with the iterator returned by this method, you should either call close() (if you are
done with the VectorGrouper) or reset() (if you want to reuse it).
Callers must process and discard the returned Grouper.Entrys immediately, because objects may be reused.
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.