[ https://issues.apache.org/jira/browse/CASSANDRA-10707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15169706#comment-15169706 ]
Benjamin Lerer commented on CASSANDRA-10707: -------------------------------------------- [~slebresne] I tried the approach that you suggested but without success. My idea was to increase the {{groupCount}} in the {{onPartitionClose()}} method if the {{rowCount}} was not equals to the {{rowLimit}}. Unfortunatly, in the case where the {{rowCount}} equals the {{rowLimit}} the next call return an empty {{PartitionIterator}}. In this case the {{Counter}} does not receive any notification and the pager consider that the data are exhausted. Without callbacks it is difficult to adjust the {{groupCount}}. Performing the modification outside of the {{CQLGroupByLimits}} is probably possible but will force us to modify the {{DataLimits}} and {{QueryParser}} interfaces to expose the {{rowCount}}. I guess it is the reason why I ended up going in the direction of passing an extra row up to the coordinator. I do not deny that there might be a better way of doing the things but so far I have not found it. If you have some suggestions do not hesitate. > Add support for Group By to Select statement > -------------------------------------------- > > Key: CASSANDRA-10707 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10707 > Project: Cassandra > Issue Type: Improvement > Components: CQL > Reporter: Benjamin Lerer > Assignee: Benjamin Lerer > > Now that Cassandra support aggregate functions, it makes sense to support > {{GROUP BY}} on the {{SELECT}} statements. > It should be possible to group either at the partition level or at the > clustering column level. > {code} > SELECT partitionKey, max(value) FROM myTable GROUP BY partitionKey; > SELECT partitionKey, clustering0, clustering1, max(value) FROM myTable GROUP > BY partitionKey, clustering0, clustering1; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)