ObjectInspectorFactory.getReflectionObjectInspector(NestedRow.class,
ObjectInspectorFactory.ObjectInspectorOptions.JAVA);
}
SerDe serde = new OrcSerde();
OutputFormat<?, ?> outFormat = new OrcOutputFormat();
RecordWriter writer =
outFormat.getRecordWriter(fs, conf, testFilePath.toString(),
Reporter.NULL);
writer.write(NullWritable.get(),
serde.serialize(new NestedRow(1,2,3), inspector));
writer.write(NullWritable.get(),
serde.serialize(new NestedRow(4,5,6), inspector));
writer.write(NullWritable.get(),
serde.serialize(new NestedRow(7,8,9), inspector));
writer.close(Reporter.NULL);
serde = new OrcSerde();
properties.setProperty("columns", "z,r");
properties.setProperty("columns.types", "int:struct<x:int,y:int>");
serde.initialize(conf, properties);
inspector = (StructObjectInspector) serde.getObjectInspector();