You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "liyang (JIRA)" <ji...@apache.org> on 2015/10/01 06:40:04 UTC
[jira] [Commented] (KYLIN-899) add "if" support in sum
[ https://issues.apache.org/jira/browse/KYLIN-899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14939319#comment-14939319 ]
liyang commented on KYLIN-899:
------------------------------
Kylin do pre-aggregation of sums, thus the condition inside sum has to be pre-defined at cube build time.
A work around is to define "if(col>1024,col,0)" as a new column say "col_1024", then define "sum(col_1024)" as a cube measure.
> add "if" support in sum
> -----------------------
>
> Key: KYLIN-899
> URL: https://issues.apache.org/jira/browse/KYLIN-899
> Project: Kylin
> Issue Type: Improvement
> Reporter: liangmeng
>
> add "if" support in sum,such as :
> select sum(if(col>1024,col,0)) as newcol from testtabale;
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)