code: func (e *hashAggExec) aggregate(value [][]byte) error {
  	err := e.evalCtx.decodeRelatedColumnVals(e.relatedColOffsets, value, e.row)
  	if err != nil {
  		return errors.Trace(err)
  	}
  	// Get group key.
  	gk, gbyKeyRow, err := e.getGroupKey()
  	if err != nil {
  		return errors.Trace(err)
  	}
  	if _, ok := e.groups[string(gk)]; !ok {
  		e.groups[string(gk)] = struct{}{}
  		e.groupKeys = append(e.groupKeys, gk)
  		e.groupKeyRows = append(e.groupKeyRows, gbyKeyRow)
  	}
  	// Update aggregate expressions.
  	aggCtxs := e.getContexts(gk)
  	for i, agg := range e.aggExprs {
  		err = agg.Update(aggCtxs[i], e.evalCtx.sc, chunk.MutRowFromDatums(e.row).ToRow())
  		if err != nil {
  			return errors.Trace(err)
  		}
  	}
  	return nil
  }
docs: // aggregate updates aggregate functions with row.