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

Richard Calaba commented on KYLIN-1886:
---------------------------------------

I would like to weight in as well, some extensions which would be helpful:

  - Here - Custome Aggregation Types - 
https://issues.apache.org/jira/browse/KYLIN-976 - if we can have generic basic 
expression aggregation as part of Kylin standard (and supported on Kylin UI) we 
might not need to do workaround to use the calculated KPIs in the views on top 
of our fact/lookup tables

 - This should allow to specify basic arithmetic expressions (+,-,*,/,  mod, 
div) - or even more advanced .... 
- and should be able to support also conditional CASTing ... as requested here 
https://issues.apache.org/jira/browse/KYLIN-976 - i.e. COUNT(CASE WHEN so.ft = 
'fv' THEN soi.sc ELSE NULL END) or Sum(if...))

   - to give an example -> I can do the SUM(a+b) as SUM(a) + SUM(b) now in 
Kylin and SQL - but I cannot do SUM(a/b) this way and I have to define it on 
the view level so it is applied to every row before it gets aggregated into 
Kylin KPI (Measure)
  
>From https://issues.apache.org/jira/browse/KYLIN-976 - I read there is a way 
>coders can provide custom aggregation types, didn't have time to check and 
>test this approach - but maybe this is the way how we can achieve it .... 
>generic extension for Kylin can be then:

    - having a option on UI to define calculated measure (inputs are: 
expression string ; set of required measures/domains (used in the expression) ; 
and jar file with customer aggregation implementation)
  
- The implementation can then read values from other measures/domains on the 
row (passed by Kylin Cube Build engine) - yes, we might need to resolve problem 
with loops between calculated measures ; maybe we allow to read only already 
defined measures (so the order of measure definition will become important)

Once we have this -> I am pretty sure someone will quickly implement generic 
expression parser and evaluator and Kylin can be easily enhanced with 
calculated fields

> When the calculation on measures is supported on Kylin?
> -------------------------------------------------------
>
>                 Key: KYLIN-1886
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1886
>             Project: Kylin
>          Issue Type: Test
>            Reporter: Rahul Choubey
>
> Suppose we have two measures and we want to do some calculation on the top of 
> these measures instead of doing it on the fly in the sql query after the cube 
> got build? Currently it does not supported in Kylin and in which version we 
> are planning to have these feature?



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

Reply via email to