code: func ColumnInfos2ColumnsWithDBName(ctx sessionctx.Context, dbName, tblName model.CIStr, colInfos []*model.ColumnInfo) []*Column {
  	columns := make([]*Column, 0, len(colInfos))
  	for _, col := range colInfos {
  		if col.State != model.StatePublic {
  			continue
  		}
  		newCol := &Column{
  			ColName:  col.Name,
  			TblName:  tblName,
  			DBName:   dbName,
  			RetType:  &col.FieldType,
  			ID:       col.ID,
  			UniqueID: ctx.GetSessionVars().AllocPlanColumnID(),
  			Index:    col.Offset,
  		}
  		columns = append(columns, newCol)
  	}
  	return columns
  }
docs: // ColumnInfos2ColumnsWithDBName converts a slice of ColumnInfo to a slice of Column.