phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serhiy Bilousov (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-1768) GROUP BY should support column position as well as column alias
Date Mon, 23 Mar 2015 02:56:10 GMT


Serhiy Bilousov commented on PHOENIX-1768:

[~jamestaylor] I think it would be helpful if we align on what is the vision here:

a) SQL standard (and if so what standard exactly)
b) specific database (PostgreSQL, Oracle, MSSQL, MySQL) 
c) make a best of all world (pick the best and make it work in Phoenix)

If you ask me I would go with c). This particular JIRA was filed mostly because I have an
issue when I can not really use expression on GROUP by because it 
changes see: [PHOENIX-1750|] + it would
make it close to PostgreSQL.

Thank you

> GROUP BY should support column position as well as column alias
> ---------------------------------------------------------------
>                 Key: PHOENIX-1768
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Serhiy Bilousov
> In postgreSQL (and many others DBs) you can specify not only column name for the GROUP
BY but column number (position in SELECT part) as well as column alias.
> see:
> Adding such support would be very helpful and sometimes necessary.
> I can provide real queries example if required but basically we want something like this
> given query
> SELECT a, b, TRUNC(current_date(),'HOUR') AS date_truncated FROM table 
> we want 
> GROUP BY 1, 2
> Having just column number would cover both but having column alias would make queries
more readable and human friendly. Plus make it one little stem closer to postgreSQL and SQL

This message was sent by Atlassian JIRA

View raw message