Package io.trino.operator
Class TopNPeerGroupLookup
- java.lang.Object
-
- io.trino.operator.TopNPeerGroupLookup
-
public class TopNPeerGroupLookup extends Object
Optimized hash table for streaming Top N peer group lookup operations.
-
-
Constructor Summary
Constructors Constructor Description TopNPeerGroupLookup(long expected, float fillFactor, RowIdHashStrategy strategy, long unmappedGroupId, long defaultReturnValue)Standard hash table parameters are expected.TopNPeerGroupLookup(long expected, RowIdHashStrategy strategy, long unmappedGroupId, long defaultReturnValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longget(long groupId, long rowId)longget(long groupId, RowReference rowReference)booleanisEmpty()longput(long groupId, long rowId, long value)longremove(long groupId, long rowId)longsize()longsizeOf()Returns the size of this hash map in bytes.
-
-
-
Constructor Detail
-
TopNPeerGroupLookup
public TopNPeerGroupLookup(long expected, float fillFactor, RowIdHashStrategy strategy, long unmappedGroupId, long defaultReturnValue)Standard hash table parameters are expected.unmappedGroupIdspecifies the internal marker value for unmapped group IDs.
-
TopNPeerGroupLookup
public TopNPeerGroupLookup(long expected, RowIdHashStrategy strategy, long unmappedGroupId, long defaultReturnValue)
-
-
Method Detail
-
sizeOf
public long sizeOf()
Returns the size of this hash map in bytes.
-
size
public long size()
-
isEmpty
public boolean isEmpty()
-
get
public long get(long groupId, long rowId)
-
get
public long get(long groupId, RowReference rowReference)
-
put
public long put(long groupId, long rowId, long value)
-
remove
public long remove(long groupId, long rowId)
-
-