[ 
https://issues.apache.org/jira/browse/PHOENIX-2992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15328183#comment-15328183
 ] 

Lars Hofhansl edited comment on PHOENIX-2992 at 6/13/16 8:25 PM:
-----------------------------------------------------------------

Thinking on it more... Can we always remove all ORDER BY's when there are only 
aggregates?
I.e. it would also work for {{SELECT SUM\(x) FROM T ORDER BY ...}} to simply 
remove the ORDER BY clause.
I suppose there might be order dependent aggregates...? Some of the window 
functions perhaps?



was (Author: lhofhansl):
Thinking on it more... Can we always remove all ORDER BY's when there are only 
aggregates?
I.e. it would also work for {{SELECT SUM(x) FROM T ORDER BY ...}} to simply 
remove the ORDER BY clause.
I suppose there might be order dependent aggregates...? Some of the window 
functions perhaps?


> Remove ORDER BY from COUNT(DISTINCT...)-only SELECT statements
> --------------------------------------------------------------
>
>                 Key: PHOENIX-2992
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2992
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 4.8.0
>
>
> In PHOENIX-2989 we observe that any ORDER BY clause can simply be removed 
> from any statement that only SELECTs on COUNT(DISTINCT ...)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to