presto-array/src/main/java/io/prestosql/array/IntBigArrays.java/IntBigArrays/selectionSort
class IntBigArrays:    private static void selectionSort(final int[][] a, final long from, final long to, final IntComparator comp)
    {
        for (long i = from; i < to - 1; i++) {
            long m = i;
            for (long j = i + 1; j < to; j++) {
                if (comp.compare(IntBigArrays.get(a, j), IntBigArrays.get(a, m)) < 0) {
                    m = j;
                }
            }
            if (m != i) {
                swap(a, i, m);
            }
        }
    }