parquet-thrift/src/main/java/org/apache/parquet/thrift/ThriftSchemaConverter.java
public MessageType convert(StructType struct) {
    MessageType messageType = ThriftSchemaConvertVisitor.convert(struct, fieldProjectionFilter, true);
    fieldProjectionFilter.assertNoUnmatchedPatterns();
    return messageType;
  }
public MessageType convert(StructType struct) {
    MessageType messageType = ThriftSchemaConvertVisitor.convert(struct, fieldProjectionFilter, true);
    fieldProjectionFilter.assertNoUnmatchedPatterns();
    return messageType;
  }
struct is assumed to contain valid structOrUnionType metadata when used with this method.
This method may throw if structOrUnionType is unknown.

Use convertWithoutProjection below to convert a StructType to MessageType

@param struct the thrift type descriptor
@return the struct as a Parquet message type