public static ConsumingResult createConsumingResult(
            DataTypeFactory dataTypeFactory,
            TypeInformation<?> inputTypeInfo,
            @Nullable Schema declaredSchema) {
        final DataType inputDataType =
                TypeInfoDataTypeConverter.toDataType(dataTypeFactory, inputTypeInfo);
        return createConsumingResult(dataTypeFactory, inputDataType, declaredSchema, true);
    }
@Test
    void testInputFromRowWithNonPhysicalDeclaredSchema() {
        final TypeInformation<?> inputTypeInfo = Types.ROW(Types.INT, Types.LONG);

        final ConsumingResult result =
                SchemaTranslator.createConsumingResult(
                        dataTypeFactory(),
                        inputTypeInfo,
                        Schema.newBuilder()
                                .columnByExpression("computed", "f1 + 42")
                                .columnByExpression("computed2", "f1 - 1")
                                .primaryKeyNamed("pk", "f0")
                                .build());

        assertThat(result.getPhysicalDataType())
                .isEqualTo(ROW(FIELD("f0", INT()), FIELD("f1", BIGINT())).notNull());

        assertThat(result.isTopLevelRecord()).isTrue();

        assertThat(result.getSchema())
                .isEqualTo(
                        Schema.newBuilder()
                                .column("f0", INT().notNull()) // not null due to primary key
                                .column("f1", BIGINT())
                                .columnByExpression("computed", "f1 + 42")
                                .columnByExpression("computed2", "f1 - 1")
                                .primaryKeyNamed("pk", "f0")
                                .build());

        assertThat(result.getProjections()).isNull();
    }