public List<FieldSchema> readSchema(Configuration conf, String file) throws SerDeException {
      FileMetaData metadata;
      try {
        HadoopInputFile inputFile = HadoopInputFile.fromPath(new Path(file), conf);
        try(ParquetFileReader reader = ParquetFileReader.open(inputFile)) {
          metadata = reader.getFileMetaData();
        }
      } catch (Exception e) {
        throw new SerDeException(ErrorMsg.PARQUET_FOOTER_ERROR.getErrorCodedMsg(), e);
      }

      MessageType msg = metadata.getSchema();
      List<FieldSchema> schema = new ArrayList<>();
      String inferBinaryAsStringValue = conf.get(HiveConf.ConfVars.HIVE_PARQUET_INFER_BINARY_AS.varname);
      boolean inferBinaryAsString = serdeConstants.STRING_TYPE_NAME.equalsIgnoreCase(inferBinaryAsStringValue);

      for (Type field: msg.getFields()) {
        FieldSchema fieldSchema = convertParquetTypeToFieldSchema(field, inferBinaryAsString);
        schema.add(fieldSchema);
        LOG.debug("Inferred field schema {}", fieldSchema);
      }
      return schema;
  }
Given a complete struct type info and pruned paths containing selected fields
from the type info, return a pruned struct type info only with the selected fields.

For instance, if 'originalTypeInfo' is: s:struct<a:struct<b:int, c:boolean>, d:string>
  and 'prunedPaths' is ["s.a.b,s.d"], then the result will be:
  s:struct<a:struct<b:int>, d:string>

@param originalTypeInfo the complete struct type info
@param prunedPaths a string representing the pruned paths, separated by ','
@return the pruned struct type info
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ParquetHiveSerDe.java