@Override
  public Object next() {
    if (!hasNext()) {
      throw new NoSuchElementException();
    }
    Object ret = nextRow;
    nextRow = null;
    return ret;
  }
Rows implementation which returns rows incrementally from result set
without any buffering.
beeline/src/java/org/apache/hive/beeline/IncrementalRows.java