code: func Build(ctx sessionctx.Context, aggFuncDesc *aggregation.AggFuncDesc, ordinal int) AggFunc {
  	switch aggFuncDesc.Name {
  	case ast.AggFuncCount:
  		return buildCount(aggFuncDesc, ordinal)
  	case ast.AggFuncSum:
  		return buildSum(aggFuncDesc, ordinal)
  	case ast.AggFuncAvg:
  		return buildAvg(aggFuncDesc, ordinal)
  	case ast.AggFuncFirstRow:
  		return buildFirstRow(aggFuncDesc, ordinal)
  	case ast.AggFuncMax:
  		return buildMaxMin(aggFuncDesc, ordinal, true)
  	case ast.AggFuncMin:
  		return buildMaxMin(aggFuncDesc, ordinal, false)
  	case ast.AggFuncGroupConcat:
  		return buildGroupConcat(ctx, aggFuncDesc, ordinal)
  	case ast.AggFuncBitOr:
  		return buildBitOr(aggFuncDesc, ordinal)
  	case ast.AggFuncBitXor:
  		return buildBitXor(aggFuncDesc, ordinal)
  	case ast.AggFuncBitAnd:
  		return buildBitAnd(aggFuncDesc, ordinal)
  	}
  	return nil
  }
docs: // Build is used to build a specific AggFunc implementation according to the
  // input aggFuncDesc.