You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Robert Stupp (JIRA)" <ji...@apache.org> on 2015/09/14 20:24:45 UTC

[jira] [Resolved] (CASSANDRA-10319) aggregate sum on Counter type of Cassandra

     [ https://issues.apache.org/jira/browse/CASSANDRA-10319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Stupp resolved CASSANDRA-10319.
--------------------------------------
       Resolution: Duplicate
    Fix Version/s:     (was: 2.2.x)
                       (was: 3.x)

This issue is already addressed in CASSANDRA-9977.

> aggregate sum on Counter type of Cassandra
> ------------------------------------------
>
>                 Key: CASSANDRA-10319
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10319
>             Project: Cassandra
>          Issue Type: Wish
>          Components: Core
>            Reporter: Xin Ren
>
> I'm using Cassandra 2.2.0, and I've read "using Counter type".
> Is there a way to aggregate on Counter type column for Cassandra, similar to the following?
> {code}SELECT sum(my_counter_column) FROM my_table ;{code}
> The above query results in this error:
> {code}
> InvalidRequest: code=2200 [Invalid query] message="Invalid call to
> function sum, none of its type signatures match (known type
> signatures: system.sum : (tinyint) -> tinyint, system.sum : (smallint)
> -> smallint, system.sum : (int) -> int, system.sum : (bigint) -> bigint, 
> system.sum : (float) -> float, system.sum : (double) ->
> double, system.sum : (decimal) -> decimal, system.sum : (varint) ->
> varint)"
> {code}
> I know I can fetch all data and then do aggregation in the client, but I'm just wondering if it can be done within Cassandra. Thanks a lot.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)