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

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

Xin Ren created CASSANDRA-10319:
-----------------------------------

             Summary: 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
             Fix For: 3.x, 2.2.x


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)