forcedotcom / phoenix

BSD 3-Clause "New" or "Revised" License
559 stars 227 forks source link

Improve column labels in join queries #710

Open maryannxue opened 10 years ago

maryannxue commented 10 years ago

Column label rules are defined as follows:

  1. select: C1 --> label: C1
  2. select: T1.C1 --> label: T1.C1
  3. select: T_ALIAS.C1 (from T1 as T_ALIAS) --> label: T_ALIAS.C1
  4. select: C1 as C_ALIAS or T1.C1 as C_ALIAS --> label: C_ALIAS
  5. select: * (from T1 join T2) --> label: T1.C1, T1.C2, T1.C3, ..., T2.C1, T2.C2, T2.C3, ...
  6. select: * (from T1 as TL join T2 as TR) --> label: TL.C1, TL.C2, TL.C3, ..., TR.C1, TR.C2, TR.C3, ...