James Taylor created PHOENIX-1010:
-------------------------------------

             Summary: Derived aggregate query with outer limit fails to compile
                 Key: PHOENIX-1010
                 URL: https://issues.apache.org/jira/browse/PHOENIX-1010
             Project: Phoenix
          Issue Type: Bug
            Reporter: James Taylor
            Assignee: Maryann Xue


Came across this while answering a question on the HBase mailing list. I 
thought I needed a derived query, but it turns out I didn't.
The following query:
{code}
SELECT u, s FROM (
    SELECT WEBSITE_URL u, SUM(HIT_COUNT) s 
    FROM WEBSITE_STATS
    GROUP BY WEBSITE_URL
    ORDER BY SUM(HIT_COUNT))
LIMIT 10;
{code}
is really equivalent to this one:
{code}
SELECT WEBSITE_URL u, SUM(HIT_COUNT) s FROM WEBSITE_STATS
GROUP BY WEBSITE_URL
ORDER BY SUM(HIT_COUNT)
LIMIT 10;
{code}
but the derived one won't currently compile.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to