code: func (fs *FileSorter) internalSort() (*comparableRow, error) {
  	w := fs.workers[fs.cWorker]
  
  	if !fs.fetched {
  		sort.Sort(w)
  		if w.err != nil {
  			return nil, errors.Trace(w.err)
  		}
  		fs.fetched = true
  	}
  	if fs.cursor < len(w.buf) {
  		r := w.buf[fs.cursor]
  		fs.cursor++
  		return r, nil
  	}
  	return nil, nil
  }
docs: // internalSort performs full in-memory sort.