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 testInputFromRow() {
        final TypeInformation<?> inputTypeInfo =
                Types.ROW(Types.ROW(Types.INT, Types.BOOLEAN), Types.ENUM(DayOfWeek.class));

        final ConsumingResult result =
                SchemaTranslator.createConsumingResult(
                        dataTypeFactoryWithRawType(DayOfWeek.class), inputTypeInfo, null);

        assertThat(result.getPhysicalDataType())
                .isEqualTo(
                        ROW(
                                        FIELD(
                                                "f0",
                                                ROW(FIELD("f0", INT()), FIELD("f1", BOOLEAN()))),
                                        FIELD("f1", DataTypeFactoryMock.dummyRaw(DayOfWeek.class)))
                                .notNull());

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

        assertThat(result.getSchema())
                .isEqualTo(
                        Schema.newBuilder()
                                .column("f0", ROW(FIELD("f0", INT()), FIELD("f1", BOOLEAN())))
                                .column("f1", DataTypeFactoryMock.dummyRaw(DayOfWeek.class))
                                .build());

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