presto-main/src/main/java/io/prestosql/operator/scalar/ArrayCombinationsFunction.java/ArrayCombinationsFunction/nextCombination
class ArrayCombinationsFunction:    private static boolean nextCombination(int[] combination, int combinationLength)
    {
        for (int i = 0; i < combinationLength; i++) {
            if (combination[i] + 1 < combination[i + 1]) {
                combination[i]++;
                resetCombination(combination, i);
                return true;
            }
        }
        return false;
    }