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

Sylvain Lebresne commented on CASSANDRA-4914:
---------------------------------------------

bq. Basically, enhance the metadata so users can declare which aggregations 
they want on a table, and along which dimensions. Then, maintain those 
aggregations in separate CFs as part of the flush/compaction processes (and 
extend CQL to allow them to be queried).

Other opinions may vary, but as for my own, I think this may be going a bit too 
far for what should be in C*/CQL. This feels to lend a bit outside of what we 
can reasonably provide out of the box, and in particular I suspect doing this 
in a way that is generic enough is not a small amount of work. Providing 
slightly more convenient building blocks like CASSANDRA-6412 but letting users 
do what they want with it feels a tad more on-focus to me.

But "interest" is not a black and white concept. If someone comes up with a 
precise plan for something like this that is elegant, generic enough and don't 
require a zillions of un-maintainable lines of codes, it'll certainly boost my 
interest meter.

> Aggregate functions in CQL
> --------------------------
>
>                 Key: CASSANDRA-4914
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4914
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Vijay
>            Assignee: Vijay
>             Fix For: 2.1
>
>
> The requirement is to do aggregation of data in Cassandra (Wide row of column 
> values of int, double, float etc).
> With some basic agree gate functions like AVG, SUM, Mean, Min, Max, etc (for 
> the columns within a row).
> Example:
> SELECT * FROM emp WHERE empID IN (130) ORDER BY deptID DESC;                  
>                   
>  empid | deptid | first_name | last_name | salary
> -------+--------+------------+-----------+--------
>    130 |      3 |     joe    |     doe   |   10.1
>    130 |      2 |     joe    |     doe   |    100
>    130 |      1 |     joe    |     doe   |  1e+03
>  
> SELECT sum(salary), empid FROM emp WHERE empID IN (130);                      
>               
>  sum(salary) | empid
> -------------+--------
>    1110.1    |  130



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to