private TableSchema getProjectedSchema() {
        if (projectedFields == null) {
            return schema;
        } else {
            String[] fullNames = schema.getFieldNames();
            DataType[] fullTypes = schema.getFieldDataTypes();
            return TableSchema.builder()
                    .fields(
                            Arrays.stream(projectedFields).mapToObj(i -> fullNames[i]).toArray(String[]::new),
                            Arrays.stream(projectedFields).mapToObj(i -> fullTypes[i]).toArray(DataType[]::new))
                    .build();
        }
    }
Flink Iceberg table source.
Copy from iceberg-flink:iceberg-flink-1.15:1.3.1
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/source/IcebergTableSource.java