code: public Iterator<InternalRow> rowIterator() {
      final int maxRows = numRows;
      final MutableColumnarRow row = new MutableColumnarRow(columns);
      return new Iterator<InternalRow>() {
        int rowId = 0;
  
        @Override
        public boolean hasNext() {
          return rowId < maxRows;
        }
  
        @Override
        public InternalRow next() {
          if (rowId >= maxRows) {
            throw new NoSuchElementException();
          }
          row.rowId = rowId++;
          return row;
        }
  
        @Override
        public void remove() {
          throw new UnsupportedOperationException();
        }
      };
    }
docs: Returns an iterator over the rows in this batch.