public void selectFields(String[] fieldNames) {
		checkNotNull(fieldNames, "fieldNames");
		this.fieldNames = fieldNames;
		RowTypeInfo rowTypeInfo = (RowTypeInfo) ParquetSchemaConverter.fromParquetType(expectedFileSchema);
		TypeInformation[] selectFieldTypes = new TypeInformation[fieldNames.length];
		for (int i = 0; i < fieldNames.length; i++) {
			try {
				selectFieldTypes[i] = rowTypeInfo.getTypeAt(fieldNames[i]);
			} catch (IndexOutOfBoundsException e) {
				throw new IllegalArgumentException(String.format("Fail to access Field %s , "
						+ "which is not contained in the file schema", fieldNames[i]), e);
			}
		}
		this.fieldTypes = selectFieldTypes;
	}
public void selectFields ( String [ ] fieldNames ) { checkNotNull ( fieldNames , "fieldNames" ) ; this . fieldNames = fieldNames ; RowTypeInfo rowTypeInfo = ( RowTypeInfo ) ParquetSchemaConverter . fromParquetType ( expectedFileSchema ) ; TypeInformation [ ] selectFieldTypes = new TypeInformation [ fieldNames . length ] ; for ( int i = 0 ; i < fieldNames . length ; i ++ ) { try { selectFieldTypes [ i ] = rowTypeInfo . getTypeAt ( fieldNames [ i ] ) ; } catch ( IndexOutOfBoundsException e ) { throw new IllegalArgumentException ( String . format ( "Fail to access Field %s , " + "which is not contained in the file schema" , fieldNames [ i ] ) , e ) ; } } this . fieldTypes = selectFieldTypes ; }
Configures the fields to be read and returned by the ParquetInputFormat. Selected fields must be present
in the configured schema.

@param fieldNames Names of all selected fields.