Class SortUtil
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.sort.SortUtil
-
public class SortUtil extends Object
Util for sort.
-
-
Constructor Summary
Constructors Constructor Description SortUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcompareBinary(byte[] a, byte[] b)static intcompareBinary(byte[] buffer1, int offset1, int length1, byte[] buffer2, int offset2, int length2)static voidmaxNormalizedKey(org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)Max unsigned byte is -1.static voidminNormalizedKey(org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)static voidputBinaryNormalizedKey(byte[] value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)static voidputBooleanNormalizedKey(boolean value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)static voidputByteNormalizedKey(byte value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)static voidputDecimalNormalizedKey(org.apache.flink.table.data.DecimalData record, org.apache.flink.core.memory.MemorySegment target, int offset, int len)Just support the compact precision decimal.static voidputDoubleNormalizedKey(double value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)See http://stereopsis.com/radix.html for more details.static voidputFloatNormalizedKey(float value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)See http://stereopsis.com/radix.html for more details.static voidputIntNormalizedKey(int value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)static voidputLongNormalizedKey(long value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)static voidputShortNormalizedKey(short value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)static voidputStringNormalizedKey(org.apache.flink.table.data.StringData value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)UTF-8 supports bytes comparison.static voidputTimestampNormalizedKey(org.apache.flink.table.data.TimestampData value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)Support the compact precision TimestampData.
-
-
-
Method Detail
-
minNormalizedKey
public static void minNormalizedKey(org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)
-
maxNormalizedKey
public static void maxNormalizedKey(org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)Max unsigned byte is -1.
-
putShortNormalizedKey
public static void putShortNormalizedKey(short value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)
-
putByteNormalizedKey
public static void putByteNormalizedKey(byte value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)
-
putBooleanNormalizedKey
public static void putBooleanNormalizedKey(boolean value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)
-
putStringNormalizedKey
public static void putStringNormalizedKey(org.apache.flink.table.data.StringData value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)UTF-8 supports bytes comparison.
-
putDecimalNormalizedKey
public static void putDecimalNormalizedKey(org.apache.flink.table.data.DecimalData record, org.apache.flink.core.memory.MemorySegment target, int offset, int len)Just support the compact precision decimal.
-
putIntNormalizedKey
public static void putIntNormalizedKey(int value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)
-
putLongNormalizedKey
public static void putLongNormalizedKey(long value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)
-
putFloatNormalizedKey
public static void putFloatNormalizedKey(float value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)See http://stereopsis.com/radix.html for more details.
-
putDoubleNormalizedKey
public static void putDoubleNormalizedKey(double value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)See http://stereopsis.com/radix.html for more details.
-
putBinaryNormalizedKey
public static void putBinaryNormalizedKey(byte[] value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)
-
putTimestampNormalizedKey
public static void putTimestampNormalizedKey(org.apache.flink.table.data.TimestampData value, org.apache.flink.core.memory.MemorySegment target, int offset, int numBytes)Support the compact precision TimestampData.
-
compareBinary
public static int compareBinary(byte[] a, byte[] b)
-
compareBinary
public static int compareBinary(byte[] buffer1, int offset1, int length1, byte[] buffer2, int offset2, int length2)
-
-