code: func (w *HashAggPartialWorker) getGroupKey(sc *stmtctx.StatementContext, row chunk.Row) ([]byte, error) {
  	w.groupValDatums = w.groupValDatums[:0]
  	for _, item := range w.groupByItems {
  		v, err := item.Eval(row)
  		if err != nil {
  			return nil, err
  		}
  		// This check is used to avoid error during the execution of `EncodeDecimal`.
  		if item.GetType().Tp == mysql.TypeNewDecimal {
  			v.SetLength(0)
  		}
  		w.groupValDatums = append(w.groupValDatums, v)
  	}
  	var err error
  	w.groupKey, err = codec.EncodeValue(sc, w.groupKey[:0], w.groupValDatums...)
  	return w.groupKey, err
  }
docs: // getGroupKey evaluates the group items and args of aggregate functions.