OrcRowInputFormat extends FileInputFormat<Row> implements ResultTypeQueryable<Row> { @Override public TypeInformation<Row> getProducedType() { return rowType; } OrcRowInputFormat(String path, String schemaString, Configuration orcConfig);  OrcRowInputFormat(String path, String schemaString, Configuration orcConfig, int batchSize);  OrcRowInputFormat(String path, TypeDescription orcSchema, Configuration orcConfig, int batchSize); void addPredicate(Predicate predicate); void selectFields(int... selectedFields); @Override void openInputFormat(); @Override void open(FileInputSplit fileSplit); @Override void close(); @Override void closeInputFormat(); @Override boolean reachedEnd(); @Override Row nextRecord(Row reuse); @Override TypeInformation<Row> getProducedType();  }
@Test public void testProducedType() throws IOException { rowOrcInputFormat = new OrcRowInputFormat(getPath(TEST_FILE_NESTED), TEST_SCHEMA_NESTED, new Configuration()); assertTrue(rowOrcInputFormat.getProducedType() instanceof RowTypeInfo); RowTypeInfo producedType = (RowTypeInfo) rowOrcInputFormat.getProducedType(); assertArrayEquals( new TypeInformation[]{ Types.BOOLEAN, Types.BYTE, Types.SHORT, Types.INT, Types.LONG, Types.FLOAT, Types.DOUBLE, PrimitiveArrayTypeInfo.BYTE_PRIMITIVE_ARRAY_TYPE_INFO, Types.STRING, Types.ROW_NAMED( new String[]{"list"}, ObjectArrayTypeInfo.getInfoFor( Types.ROW_NAMED(new String[]{"int1", "string1"}, Types.INT, Types.STRING))), ObjectArrayTypeInfo.getInfoFor( Types.ROW_NAMED(new String[]{"int1", "string1"}, Types.INT, Types.STRING)), new MapTypeInfo<>(Types.STRING, Types.ROW_NAMED(new String[]{"int1", "string1"}, Types.INT, Types.STRING)) }, producedType.getFieldTypes()); assertArrayEquals( new String[]{"boolean1", "byte1", "short1", "int1", "long1", "float1", "double1", "bytes1", "string1", "middle", "list", "map"}, producedType.getFieldNames()); }