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 testFieldMappingNonMatchingTypes() {
        assertThatThrownBy(
                        () ->
                                TypeMappingUtils.computePhysicalIndices(
                                        TableSchema.builder()
                                                .field("f1", DataTypes.BIGINT())
                                                .field("f0", DataTypes.TIMESTAMP(3))
                                                .build()
                                                .getTableColumns(),
                                        ROW(
                                                FIELD("f0", DataTypes.STRING()),
                                                FIELD("f1", DataTypes.BIGINT())),
                                        Function.identity()))
                .isInstanceOf(ValidationException.class)
                .hasMessage(
                        "Type TIMESTAMP(3) of table field 'f0' does not match with the physical "
                                + "type STRING of the 'f0' field of the TableSource return type.");
    }