code: func buildGroupConcat(ctx sessionctx.Context, aggFuncDesc *aggregation.AggFuncDesc, ordinal int) AggFunc {
  	switch aggFuncDesc.Mode {
  	case aggregation.DedupMode:
  		return nil
  	default:
  		base := baseAggFunc{
  			args:    aggFuncDesc.Args[:len(aggFuncDesc.Args)-1],
  			ordinal: ordinal,
  		}
  		// The last arg is promised to be a not-null string constant, so the error can be ignored.
  		c, _ := aggFuncDesc.Args[len(aggFuncDesc.Args)-1].(*expression.Constant)
  		sep, _, err := c.EvalString(nil, chunk.Row{})
  		// This err should never happen.
  		if err != nil {
  			panic(fmt.Sprintf("Error happened when buildGroupConcat: %s", err.Error()))
  		}
  		var s string
  		s, err = variable.GetSessionSystemVar(ctx.GetSessionVars(), variable.GroupConcatMaxLen)
  		if err != nil {
  			panic(fmt.Sprintf("Error happened when buildGroupConcat: no system variable named '%s'", variable.GroupConcatMaxLen))
  		}
  		maxLen, err := strconv.ParseUint(s, 10, 64)
  		// Should never happen
  		if err != nil {
  			panic(fmt.Sprintf("Error happened when buildGroupConcat: %s", err.Error()))
  		}
  		var truncated int32
  		if aggFuncDesc.HasDistinct {
  			return &groupConcatDistinct{baseGroupConcat4String{baseAggFunc: base, sep: sep, maxLen: maxLen, truncated: &truncated}}
  		}
  		return &groupConcat{baseGroupConcat4String{baseAggFunc: base, sep: sep, maxLen: maxLen, truncated: &truncated}}
  	}
  }
docs: // buildGroupConcat builds the AggFunc implementation for function "GROUP_CONCAT".