Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Duplicate
-
None
-
None
-
None
Description
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?
SELECT sum(my_counter_column) FROM my_table ;
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) -> 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.
Attachments
Issue Links
- duplicates
-
CASSANDRA-9977 Support counter-columns for native aggregates (sum,avg,max,min)
- Resolved