Class SortUtil


  • public class SortUtil
    extends Object
    Util for sort.
    • Constructor Detail

      • SortUtil

        public SortUtil()
    • Method Detail

      • minNormalizedKey

        public static void minNormalizedKey​(MemorySegment target,
                                            int offset,
                                            int numBytes)
      • maxNormalizedKey

        public static void maxNormalizedKey​(MemorySegment target,
                                            int offset,
                                            int numBytes)
        Max unsigned byte is -1.
      • putShortNormalizedKey

        public static void putShortNormalizedKey​(short value,
                                                 MemorySegment target,
                                                 int offset,
                                                 int numBytes)
      • putByteNormalizedKey

        public static void putByteNormalizedKey​(byte value,
                                                MemorySegment target,
                                                int offset,
                                                int numBytes)
      • putBooleanNormalizedKey

        public static void putBooleanNormalizedKey​(boolean value,
                                                   MemorySegment target,
                                                   int offset,
                                                   int numBytes)
      • putStringNormalizedKey

        public static void putStringNormalizedKey​(StringData value,
                                                  MemorySegment target,
                                                  int offset,
                                                  int numBytes)
        UTF-8 supports bytes comparison.
      • putDecimalNormalizedKey

        public static void putDecimalNormalizedKey​(DecimalData record,
                                                   MemorySegment target,
                                                   int offset,
                                                   int len)
        Just support the compact precision decimal.
      • putIntNormalizedKey

        public static void putIntNormalizedKey​(int value,
                                               MemorySegment target,
                                               int offset,
                                               int numBytes)
      • putLongNormalizedKey

        public static void putLongNormalizedKey​(long value,
                                                MemorySegment target,
                                                int offset,
                                                int numBytes)
      • putFloatNormalizedKey

        public static void putFloatNormalizedKey​(float value,
                                                 MemorySegment target,
                                                 int offset,
                                                 int numBytes)
        See http://stereopsis.com/radix.html for more details.
      • putDoubleNormalizedKey

        public static void putDoubleNormalizedKey​(double value,
                                                  MemorySegment target,
                                                  int offset,
                                                  int numBytes)
        See http://stereopsis.com/radix.html for more details.
      • putBinaryNormalizedKey

        public static void putBinaryNormalizedKey​(byte[] value,
                                                  MemorySegment target,
                                                  int offset,
                                                  int numBytes)
      • putTimestampNormalizedKey

        public static void putTimestampNormalizedKey​(TimestampData value,
                                                     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)