code: func (fs *FileSorter) fetchNextRow(index int) (*comparableRow, error) {
  	var (
  		err  error
  		n    int
  		head = make([]byte, 8)
  		dcod = make([]types.Datum, 0, fs.keySize+fs.valSize+1)
  	)
  	n, err = fs.fds[index].Read(head)
  	if err == io.EOF {
  		return nil, nil
  	}
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  	if n != 8 {
  		return nil, errors.New("incorrect header")
  	}
  	rowSize := int(binary.BigEndian.Uint64(head))
  
  	rowBytes := make([]byte, rowSize)
  
  	n, err = fs.fds[index].Read(rowBytes)
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  	if n != rowSize {
  		return nil, errors.New("incorrect row")
  	}
  
  	dcod, err = codec.Decode(rowBytes, fs.keySize+fs.valSize+1)
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  
  	return &comparableRow{
  		key:    dcod[:fs.keySize],
  		val:    dcod[fs.keySize : fs.keySize+fs.valSize],
  		handle: dcod[fs.keySize+fs.valSize:][0].GetInt64(),
  	}, nil
  }
docs: // Fetch the next row given the source file index.