private static List<Type> getProjectedGroupFields(GroupType schema, List<String> colNames, List<TypeInfo> colTypes) {
    List<Type> schemaTypes = new ArrayList<Type>();

    ListIterator<String> columnIterator = colNames.listIterator();
    Map<String, Type> schemaTypeMap = new HashMap<>();
    schema.getFields().forEach(t -> schemaTypeMap.put(t.getName().toLowerCase(), t));
    while (columnIterator.hasNext()) {
      TypeInfo colType = colTypes.get(columnIterator.nextIndex());
      String colName = columnIterator.next();

      Type fieldType = schemaTypeMap.get(colName.toLowerCase());
      if (fieldType == null) {
        schemaTypes.add(Types.optional(PrimitiveTypeName.BINARY).named(colName));
      } else {
        schemaTypes.add(getProjectedType(colType, fieldType));
      }
    }

    return schemaTypes;
  }
Searchs column names by name on a given Parquet schema, and returns its corresponded
Parquet schema types.

@param schema Group schema where to search for column names.
@param colNames List of column names.
@param colTypes List of column types.
@return List of GroupType objects of projected columns.
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/read/DataWritableReadSupport.java