You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2011/06/27 12:06:47 UTC

[jira] [Commented] (CASSANDRA-2830) Allow summing of counter columns in CQL

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

Sylvain Lebresne commented on CASSANDRA-2830:
---------------------------------------------

It's not a crazy idea. Though we should at the very least make it generic enough to have AVG(), MIN(), MAX() and such.

> Allow summing of counter columns in CQL
> ---------------------------------------
>
>                 Key: CASSANDRA-2830
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2830
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API
>            Reporter: Tomas Salfischberger
>            Priority: Minor
>              Labels: CQL
>
> CQL could be extended with a method to calculate the sum of a set of counter columns. This avoids transferring a long list of counter columns to be summed by the client, while the server could calculate the total and instead only transfer that result. My proposal for the syntax (based on the COUNT() suggestion in the comments of CASSANDRA-1704):
> {code}SELECT SUM(<columnFrom>..<columnTo>) FROM <CF> WHERE ...{code}
> The simplest approach would be to only allow summing of counters under the same key, thus a query with a WHERE part that specifies multiple keys would return 1 result per key. This avoids summing values from different nodes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira