cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-10707) Add support for Group By to Select statement
Date Fri, 26 Feb 2016 20:10:18 GMT


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
If you have some suggestions do not hesitate. 

> Add support for Group By to Select statement
> --------------------------------------------
>                 Key: CASSANDRA-10707
>                 URL:
>             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
> {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

View raw message