Package io.trino.operator
Class FlatHash
java.lang.Object
io.trino.operator.FlatHash
-
Constructor Summary
ConstructorsConstructorDescriptionFlatHash(FlatHashStrategy flatHashStrategy, boolean hasPrecomputedHash, int expectedSize, UpdateMemory checkMemoryReservation) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTo(int groupId, BlockBuilder[] blockBuilders) voidcomputeHashes(Block[] blocks, long[] hashes, int offset, int length) booleanbooleanbooleanensureAvailableCapacity(int batchSize) intlongintgetPhysicalPosition(int groupId) longhashPosition(int groupId) intputIfAbsent(Block[] blocks, int position) intputIfAbsent(Block[] blocks, int position, long hash) intsize()static longsumExact(long... values)
-
Constructor Details
-
FlatHash
public FlatHash(FlatHashStrategy flatHashStrategy, boolean hasPrecomputedHash, int expectedSize, UpdateMemory checkMemoryReservation)
-
-
Method Details
-
getEstimatedSize
public long getEstimatedSize() -
size
public int size() -
getCapacity
public int getCapacity() -
hashPosition
public long hashPosition(int groupId) -
appendTo
-
contains
-
contains
-
computeHashes
-
putIfAbsent
-
putIfAbsent
-
ensureAvailableCapacity
public boolean ensureAvailableCapacity(int batchSize) -
getPhysicalPosition
public int getPhysicalPosition(int groupId) -
sumExact
public static long sumExact(long... values)
-