public static int[] computePhysicalIndices(
            List<TableColumn> logicalColumns,
            DataType physicalType,
            Function<String, String> nameRemapping) {

        Map<TableColumn, Integer> physicalIndexLookup =
                computePhysicalIndices(logicalColumns.stream(), physicalType, nameRemapping);

        return logicalColumns.stream().mapToInt(physicalIndexLookup::get).toArray();
    }
@Test
    void testFieldMappingLegacyCompositeType() {
        int[] indices =
                TypeMappingUtils.computePhysicalIndices(
                        TableSchema.builder()
                                .field("f1", DataTypes.BIGINT())
                                .field("f0", DataTypes.STRING())
                                .build()
                                .getTableColumns(),
                        TypeConversions.fromLegacyInfoToDataType(
                                Types.TUPLE(Types.STRING, Types.LONG)),
                        Function.identity());

        assertThat(indices).isEqualTo(new int[] {1, 0});
    }