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 testFieldMappingRowTypeNotMatchingNamesInNestedType() {
        int[] indices =
                TypeMappingUtils.computePhysicalIndices(
                        TableSchema.builder()
                                .field("f0", DECIMAL(38, 18))
                                .field(
                                        "f1",
                                        ROW(
                                                FIELD("logical_f1_0", BIGINT()),
                                                FIELD("logical_f1_1", STRING())))
                                .build()
                                .getTableColumns(),
                        ROW(
                                FIELD("f0", DECIMAL(38, 18)),
                                FIELD(
                                        "f1",
                                        ROW(
                                                FIELD("physical_f1_0", BIGINT()),
                                                FIELD("physical_f1_1", STRING())))),
                        Function.identity());

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