You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "nichunen (Jira)" <ji...@apache.org> on 2019/10/10 07:12:00 UTC

[jira] [Closed] (KYLIN-1573) aggregator expression like sum(a+b) is not working

     [ https://issues.apache.org/jira/browse/KYLIN-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

nichunen closed KYLIN-1573.
---------------------------
    Resolution: Fixed

Sum(expr) is supported after the fix of KYLIN-3359, now supported after version 2.4.0

> aggregator expression like sum(a+b) is not working
> --------------------------------------------------
>
>                 Key: KYLIN-1573
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1573
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 1.x-HBase1.1.3
>            Reporter: Babulal
>            Assignee: liyang
>            Priority: Minor
>              Labels: newbie, test
>
> In Kylin expression like + ,/.* ..ect are not working .  
> for example 
> select country,
>        city,
>             sum(male_population+Female_population)
>            
>   from population 
>  group by country,city.
> Error 
> Caused by: java.lang.NullPointerException
> 	at org.apache.kylin.cube.CubeCapabilityChecker.tryDimensionAsMeasures(CubeCapabilityChecker.java:170)
> 	at org.apache.kylin.cube.CubeCapabilityChecker.check(CubeCapabilityChecker.java:73)
> 	at org.apache.kylin.cube.CubeInstance.isCapable(CubeInstance.java:330)
> 	at org.apache.kylin.query.routing.rules.RemoveUncapableRealizationsRule.apply(RemoveUncapableRealizationsRule.java:36)
> 	at org.apache.kylin.query.routing.RoutingRule.applyRules(RoutingRule.java:47)
> 	at org.apache.kylin.query.routing.QueryRouter.selectRealization(QueryRouter.java:63)
> 	at org.apache.kylin.query.relnode.OLAPToEnumerableConverter.implement(OLAPToEnumerableConverter.java:80)
> 	at org.apache.calcite.adapter.enumerable.EnumerableRelImplementor.implementRoot(EnumerableRelImplementor.java:102)
> 	at org.apache.calcite.adapter.enumerable.EnumerableInterpretable.toBindable(EnumerableInterpretable.java:92)
> 	at org.apache.calcite.prepare.CalcitePrepareImpl$CalcitePreparingStmt.implement(CalcitePrepareImpl.java:1171)
> 	at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:297)
> 	at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:196)
> When Query changed as below it is working fine . 
> select country,
>        city,
>             sum(male_population)+sum(Female_population)
>            
>   from population 
>  group by country,city.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)