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 testNameMappingDoesNotExist() {
        assertThatThrownBy(
                        () ->
                                TypeMappingUtils.computePhysicalIndices(
                                        TableSchema.builder()
                                                .field("f0", DataTypes.BIGINT())
                                                .build()
                                                .getTableColumns(),
                                        ROW(FIELD("f0", DataTypes.BIGINT())),
                                        str -> null))
                .isInstanceOf(ValidationException.class)
                .hasMessage("Field 'f0' could not be resolved by the field mapping.");
    }