code: func getColsInfo(tn *ast.TableName) (indicesInfo []*model.IndexInfo, colsInfo []*model.ColumnInfo, pkCol *model.ColumnInfo) {
  	tbl := tn.TableInfo
  	for _, col := range tbl.Columns {
  		if tbl.PKIsHandle && mysql.HasPriKeyFlag(col.Flag) {
  			pkCol = col
  		} else {
  			colsInfo = append(colsInfo, col)
  		}
  	}
  	for _, idx := range tn.TableInfo.Indices {
  		if idx.State == model.StatePublic {
  			indicesInfo = append(indicesInfo, idx)
  		}
  	}
  	return
  }
docs: // getColsInfo returns the info of index columns, normal columns and primary key.