Interface NormalizedKeyComputer
public interface NormalizedKeyComputer
Normalized key computer for
BinaryInMemorySortBuffer. For performance, subclasses are
usually implemented through CodeGenerator.-
Method Summary
Modifier and TypeMethodDescriptionintcompareKey(org.apache.flink.core.memory.MemorySegment segI, int offsetI, org.apache.flink.core.memory.MemorySegment segJ, int offsetJ) Compares two normalized keys in respectiveMemorySegment.intGet normalized keys bytes length.booleanFlag whether normalized key comparisons should be inverted key.booleanwhether the normalized key can fully determines the comparison.voidputKey(org.apache.flink.table.data.RowData record, org.apache.flink.core.memory.MemorySegment target, int offset) Writes a normalized key for the given record into the targetMemorySegment.voidswapKey(org.apache.flink.core.memory.MemorySegment segI, int offsetI, org.apache.flink.core.memory.MemorySegment segJ, int offsetJ) Swaps two normalized keys in respectiveMemorySegment.
-
Method Details
-
putKey
void putKey(org.apache.flink.table.data.RowData record, org.apache.flink.core.memory.MemorySegment target, int offset) Writes a normalized key for the given record into the targetMemorySegment. -
compareKey
int compareKey(org.apache.flink.core.memory.MemorySegment segI, int offsetI, org.apache.flink.core.memory.MemorySegment segJ, int offsetJ) Compares two normalized keys in respectiveMemorySegment. -
swapKey
void swapKey(org.apache.flink.core.memory.MemorySegment segI, int offsetI, org.apache.flink.core.memory.MemorySegment segJ, int offsetJ) Swaps two normalized keys in respectiveMemorySegment. -
getNumKeyBytes
int getNumKeyBytes()Get normalized keys bytes length. -
isKeyFullyDetermines
boolean isKeyFullyDetermines()whether the normalized key can fully determines the comparison. -
invertKey
boolean invertKey()Flag whether normalized key comparisons should be inverted key.
-