code: func (e *topNExec) evalTopN(value [][]byte) error {
  	newRow := &sortRow{
  		key: make([]types.Datum, len(value)),
  	}
  	err := e.evalCtx.decodeRelatedColumnVals(e.relatedColOffsets, value, e.row)
  	if err != nil {
  		return errors.Trace(err)
  	}
  	for i, expr := range e.orderByExprs {
  		newRow.key[i], err = expr.Eval(chunk.MutRowFromDatums(e.row).ToRow())
  		if err != nil {
  			return errors.Trace(err)
  		}
  	}
  
  	if e.heap.tryToAddRow(newRow) {
  		newRow.data = append(newRow.data, value...)
  	}
  	return errors.Trace(e.heap.err)
  }
docs: // evalTopN evaluates the top n elements from the data. The input receives a record including its handle and data.
  // And this function will check if this record can replace one of the old records.