code: func buildFirstRow(aggFuncDesc *aggregation.AggFuncDesc, ordinal int) AggFunc {
  	base := baseAggFunc{
  		args:    aggFuncDesc.Args,
  		ordinal: ordinal,
  	}
  
  	evalType, fieldType := aggFuncDesc.RetTp.EvalType(), aggFuncDesc.RetTp
  	if fieldType.Tp == mysql.TypeBit {
  		evalType = types.ETString
  	}
  	switch aggFuncDesc.Mode {
  	case aggregation.DedupMode:
  	default:
  		switch evalType {
  		case types.ETInt:
  			return &firstRow4Int{base}
  		case types.ETReal:
  			switch fieldType.Tp {
  			case mysql.TypeFloat:
  				return &firstRow4Float32{base}
  			case mysql.TypeDouble:
  				return &firstRow4Float64{base}
  			}
  		case types.ETDecimal:
  			return &firstRow4Decimal{base}
  		case types.ETDatetime, types.ETTimestamp:
  			return &firstRow4Time{base}
  		case types.ETDuration:
  			return &firstRow4Duration{base}
  		case types.ETString:
  			return &firstRow4String{base}
  		case types.ETJson:
  			return &firstRow4JSON{base}
  		}
  	}
  	return nil
  }
docs: // buildFirstRow builds the AggFunc implementation for function "FIRST_ROW".