use of org.apache.flink.types.NormalizableKey in project flink by apache.
the class RecordComparator method putNormalizedKey.
@Override
public void putNormalizedKey(Record record, MemorySegment target, int offset, int numBytes) {
int i = 0;
try {
for (; i < this.numLeadingNormalizableKeys & numBytes > 0; i++) {
int len = this.normalizedKeyLengths[i];
len = numBytes >= len ? len : numBytes;
((NormalizableKey<?>) record.getField(this.keyFields[i], this.transientKeyHolders[i])).copyNormalizedKey(target, offset, len);
numBytes -= len;
offset += len;
}
} catch (NullPointerException npex) {
throw new NullKeyFieldException(this.keyFields[i]);
}
}
Aggregations