use of org.apache.parquet.thrift.projection.FieldsPath in project parquet-mr by apache.
the class ThriftSchemaConvertVisitor method convert.
public static MessageType convert(StructType struct, FieldProjectionFilter filter, boolean keepOneOfEachUnion) {
State state = new State(new FieldsPath(), REPEATED, "ParquetSchema");
ConvertedField converted = struct.accept(new ThriftSchemaConvertVisitor(filter, true, keepOneOfEachUnion), state);
if (!converted.isKeep()) {
throw new ThriftProjectionException("No columns have been selected");
}
return new MessageType(state.name, converted.asKeep().getType().asGroupType().getFields());
}
Aggregations