phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-1749) ORDER BY should support ordinal position as well as expression
Date Thu, 09 Apr 2015 03:19:12 GMT


James Taylor commented on PHOENIX-1749:

That approach sounds promising, but my worry is that it won't handle cases where we have a
function invocation that is still ok wrt ordering. This comes up primarily with CAST that
gets done when we translate between using a data table and index table (due to the type differences).
With Calcite, if we can go the materialized view route, perhaps this isn't an issue.

> ORDER BY should support ordinal position as well as expression
> --------------------------------------------------------------
>                 Key: PHOENIX-1749
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Serhiy Bilousov
>            Assignee: Alicia Ying Shu
>         Attachments: PHOENIX-1749-v1.patch, PHOENIX-1749.patch, Phoenix-1749-v2.patch
> In postgreSQL (and many others DBs) you can specify not only column name for the ORDER
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 
> ORDER BY date_truncated 
> 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