presto-spi/src/main/java/io/prestosql/spi/type/Chars.java/Chars/compareCharsShorterToLonger
class Chars:    private static int compareCharsShorterToLonger(Slice shorter, Slice longer)
    {
        for (int i = 0; i < shorter.length(); ++i) {
            int result = compareUnsignedBytes(shorter.getByte(i), longer.getByte(i));
            if (result != 0) {
                return result;
            }
        }

        for (int i = shorter.length(); i < longer.length(); ++i) {
            int result = compareUnsignedBytes((byte) ' ', longer.getByte(i));
            if (result != 0) {
                return result;
            }
        }
        return 0;
    }