presto-main/src/main/java/io/prestosql/sql/analyzer/RelationType.java/RelationType/RelationType
class RelationType:    public RelationType(List<Field> fields)
    {
        requireNonNull(fields, "fields is null");
        this.allFields = ImmutableList.copyOf(fields);
        this.visibleFields = fields.stream()
                .filter(field -> !field.isHidden())
                .collect(toImmutableList());

        int index = 0;
        ImmutableMap.Builder<Field, Integer> builder = ImmutableMap.builder();
        for (Field field : fields) {
            builder.put(field, index++);
        }
        fieldIndexes = builder.build();
    }