Search in sources :

Example 1 with NormalizableKey

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]);
    }
}
Also used : NormalizableKey(org.apache.flink.types.NormalizableKey) NullKeyFieldException(org.apache.flink.types.NullKeyFieldException)

Aggregations

NormalizableKey (org.apache.flink.types.NormalizableKey)1 NullKeyFieldException (org.apache.flink.types.NullKeyFieldException)1