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 testInputFromAtomicWithPhysicalDeclaredSchema() {
        final TypeInformation<?> inputTypeInfo = Types.GENERIC(Row.class);

        final ConsumingResult result =
                SchemaTranslator.createConsumingResult(
                        dataTypeFactoryWithRawType(Row.class),
                        inputTypeInfo,
                        Schema.newBuilder()
                                .columnByExpression("f0_0", "f0.f0_0")
                                .column("f0", ROW(FIELD("f0_0", INT()), FIELD("f0_1", BOOLEAN())))
                                .columnByExpression("f0_1", "f0.f0_1")
                                .build());

        assertThat(result.getPhysicalDataType())
                .isEqualTo(ROW(FIELD("f0_0", INT()), FIELD("f0_1", BOOLEAN())));

        assertThat(result.isTopLevelRecord()).isFalse();

        assertThat(result.getSchema())
                .isEqualTo(
                        Schema.newBuilder()
                                .column("f0", ROW(FIELD("f0_0", INT()), FIELD("f0_1", BOOLEAN())))
                                .columnByExpression("f0_0", "f0.f0_0")
                                .columnByExpression("f0_1", "f0.f0_1")
                                .build());

        assertThat(result.getProjections()).isEqualTo(Arrays.asList("f0_0", "f0", "f0_1"));
    }