presto-main/src/main/java/io/prestosql/operator/scalar/ArraySortComparatorFunction.java/ArraySortComparatorFunction/initPositionsList
class ArraySortComparatorFunction:    private void initPositionsList(int arrayLength)
    {
        if (positions.size() < arrayLength) {
            positions = Ints.asList(new int[arrayLength]);
        }
        for (int i = 0; i < arrayLength; i++) {
            positions.set(i, i);
        }
    }