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

James Taylor commented on PHOENIX-2992:
---------------------------------------

We should remove the ORDER BY for all cases of ungrouped aggregations, so IMHO 
we should either:
- Make the check {{if (groupBy.isUngroupedAggregation() || groupBy == 
GroupBy.UNGROUPED_GROUP_BY) { }}
- Have groupBy.isUngroupedAggregation() be true for GroupBy.UNGROUPED_GROUP_BY

Based on the name of the method, isUngroupedAggregation, I'd lean toward the 
latter as otherwise it's a bit confusing. If we do the former, then we should 
probably rename the isUngroupedAggregation method to something like 
isUngroupedCountDistinct.

> 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
>
>         Attachments: 2989-orderby-v3.txt
>
>
> 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