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

Shaofeng SHI reopened KYLIN-1480:
---------------------------------

The patch wasn't merged, so re-open it.

Yu, is this problem still there?

> NPE throws while execute sql with more than two join.
> -----------------------------------------------------
>
>                 Key: KYLIN-1480
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1480
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v1.4.0, v1.2, v1.1, v1.0
>            Reporter: fengYu
>            Assignee: fengYu
>         Attachments: 0001-unit-test-case-for-KYLIN-1480.patch, 
> NPE-in-more-joins.patch
>
>
> Hi, I encounter NPE while execute sql more than two join, for example : 
> select A.type, A.cmd, count(1) from fact as A inner join (select type, 
> count(1) from fact group by type having count(1) > 2) as B on A.type = B.type 
> inner join (select cmd, count(1) from fact group by cmd having count(1) > 2) 
> as C on A.cmd = C.cmd group by A.type, A.cmd;
> the fact table is create like this : 
> CREATE TABLE `fact`(
>   `fname` string, 
>   `lname` string, 
>   `dt` date, 
>   `cost` int, 
>   `type` string, 
>   `cmd` string);
> Kylin throws exception like this : 
> Caused by: java.lang.NullPointerException
>         at 
> org.apache.kylin.query.relnode.OLAPProjectRel.implementOLAP(OLAPProjectRel.java:103)
>         at 
> org.apache.kylin.query.relnode.OLAPRel$OLAPImplementor.visitChild(OLAPRel.java:81)
>         at 
> org.apache.kylin.query.relnode.OLAPAggregateRel.implementOLAP(OLAPAggregateRel.java:132)
>         at 
> org.apache.kylin.query.relnode.OLAPRel$OLAPImplementor.visitChild(OLAPRel.java:81)
>         at 
> org.apache.kylin.query.relnode.OLAPLimitRel.implementOLAP(OLAPLimitRel.java:73)
>         at 
> org.apache.kylin.query.relnode.OLAPRel$OLAPImplementor.visitChild(OLAPRel.java:81)
>         at 
> org.apache.kylin.query.relnode.OLAPToEnumerableConverter.implement(OLAPToEnumerableConverter.java:67)
>         at 
> org.apache.calcite.adapter.enumerable.EnumerableRelImplementor.implementRoot(EnumerableRelImplementor.java:99)
>         at 
> org.apache.calcite.adapter.enumerable.EnumerableInterpretable.toBindable(EnumerableInterpretable.java:92)
>         at 
> org.apache.calcite.prepare.CalcitePrepareImpl$CalcitePreparingStmt.implement(CalcitePrepareImpl.java:1050)
>         at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:293)
>         at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:188)
>         at 
> org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:671)
>         at 
> org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:572)
>         at 
> org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:541)
>         at 
> org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:173)
>         at 
> org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:561)
>         at 
> org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:477)
>         at 
> org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:109)
> I try it in kylin-1.0 and kylin-2.x-staging, the same exception throws.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to