code: func (b *PlanBuilder) buildProjectionField(id, position int, field *ast.SelectField, expr expression.Expression) (*expression.Column, error) {
  	var origTblName, tblName, origColName, colName, dbName model.CIStr
  	if c, ok := expr.(*expression.Column); ok && !c.IsReferenced {
  		// Field is a column reference.
  		colName, origColName, tblName, origTblName, dbName = b.buildProjectionFieldNameFromColumns(field, c)
  	} else if field.AsName.L != "" {
  		// Field has alias.
  		colName = field.AsName
  	} else {
  		// Other: field is an expression.
  		var err error
  		if colName, err = b.buildProjectionFieldNameFromExpressions(field); err != nil {
  			return nil, err
  		}
  	}
  	return &expression.Column{
  		UniqueID:    b.ctx.GetSessionVars().AllocPlanColumnID(),
  		TblName:     tblName,
  		OrigTblName: origTblName,
  		ColName:     colName,
  		OrigColName: origColName,
  		DBName:      dbName,
  		RetType:     expr.GetType(),
  	}, nil
  }
docs: // buildProjectionField builds the field object according to SelectField in projection.