presto-main/src/main/java/io/prestosql/sql/planner/optimizations/LocalProperties.java/LocalProperties/extractLeadingConstants
class LocalProperties:    public static <T> Set<T> extractLeadingConstants(List<? extends LocalProperty<T>> properties)
    {
        ImmutableSet.Builder<T> builder = ImmutableSet.builder();
        PeekingIterator<? extends LocalProperty<T>> iterator = peekingIterator(properties.iterator());
        while (iterator.hasNext() && iterator.peek() instanceof ConstantProperty) {
            builder.add(((ConstantProperty<T>) iterator.next()).getColumn());
        }
        return builder.build();
    }