@Override
  public boolean hasNext() {
    try {
      if (this.buffer.hasNext()) {
        return true;
      } else {
        this.buffer = new BufferedRows(this.beeLine, this.rs,
                Optional.of(this.incrementalBufferRows));
        if (this.normalizingWidths) {
          this.buffer.normalizeWidths();
        }

        // Drain the first Row, which just contains column names
        if (!this.buffer.hasNext()) {
          return false;
        }
        this.buffer.next();

        return this.buffer.hasNext();
      }
    } catch (SQLException ex) {
      throw new RuntimeException(ex.toString());
    }
  }
Extension of {@link IncrementalRows} which buffers "x" number of rows in memory at a time. It
uses the {@link BufferedRows} class to do its buffering. The value of "x" is determined  by the
Beeline option <code>--incrementalBufferRows</code>, which defaults to
{@link BeeLineOpts#DEFAULT_INCREMENTAL_BUFFER_ROWS}. Once the initial set of rows are buffered, it
will allow the {@link #next()} method to drain the buffer. Once the buffer is empty the next
buffer will be fetched until the {@link ResultSet} is empty. The width of the rows are normalized
within each buffer using the {@link BufferedRows#normalizeWidths()} method.
beeline/src/java/org/apache/hive/beeline/IncrementalRowsWithNormalization.java