cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xin Ren (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-10319) aggregate sum on Counter type of Cassandra
Date Mon, 14 Sep 2015 16:44:45 GMT
Xin Ren created CASSANDRA-10319:

             Summary: aggregate sum on Counter type of Cassandra
                 Key: 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:
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) ->
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

View raw message