helper for SyntheticTable.columns. takes something from SelectX.cols, returns a string column name

def col2name(col_item):
  "helper for SyntheticTable.columns. takes something from SelectX.cols, returns a string column name"
  if isinstance(col_item, sqparse2.NameX): return col_item.name
  elif isinstance(col_item, sqparse2.AliasX): return col_item.alias
  else: raise TypeError(type(col_item), col_item)