[
https://issues.apache.org/jira/browse/CASSANDRA-10707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15112398#comment-15112398
]
Benjamin Lerer commented on CASSANDRA-10707:
--------------------------------------------
This ticket add only support for a {{GROUP BY}} clause with primary key columns.
We might add support for some specific functions in the {{GROUP BY}} clause.
Adding support for UDFs in the {{GROUP BY}} clause is a more tricky problem.
By grouping the data by primary key prefixes, we make sure that we control the
amount of memory used. As long as a function guaranty the same order as the
underlying column, it will work fine in the {{GROUP BY}} clause. If not, the
results returned will not make sense anymore. By consequence, allowing UDF in
the Group By clause present some risks.
> 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)