[
https://issues.apache.org/jira/browse/CASSANDRA-10707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375590#comment-15375590
]
Benjamin Lerer commented on CASSANDRA-10707:
--------------------------------------------
Thanks for the deep review.
I have merge the previous commits and pushed new ones to address the review
comments.
|[c* branch|https://github.com/blerer/cassandra/tree/10707-trunk]|[dtest
branch|https://github.com/riptano/cassandra-dtest/compare/master...blerer:CASSANDRA-10707?expand=1]|[utests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10707-trunk-testall/]|[dtests|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10707-trunk-dtest/]|
bq. At the end of SelectStatement.getAggregationSpecification, I believe the
clusteringPrefixSize > 0 && isDistinct test is redundant since we'd have exited
early in that case.
The test is valid but it turned out that the unit tests were using
{{assertInvalid}} instead of {{assertInvalidMessage}}. I fixed that problem.
> 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
> Fix For: 3.x
>
>
> 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)