title: BigQuery - How to iterate over results using java API
body: <p>I am trying to download a query result of 90k rows (this amount states the web UI and the resulting object) but I obtain more than 130k items in the iterator as follows:</p>
  
  <pre><code>QueryRequest queryRequest = QueryRequest
                                          .newBuilder("......")
                                          .setUseLegacySql(true)
                                          .build();
  QueryResponse response = bigquery.query(queryRequest);
  QueryResult result = response.getResult();
  Integer c = 0;
  
  while(result != null){
            Iterator&lt;List&lt;FieldValue&gt;&gt; iter = result.iterateAll();
            while(iter.hasNext()){
                iter.next();
                c++;
              }    
            result = result.getNextPage();
  }
  </code></pre>
  
  <p>At the end of the reading is about 130K but <code>reuslt.getTotalRows()</code> contains 90K.</p>
  
  <p>Do you have any idea on what I'am doing not correctly?</p>