You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Shaofeng SHI (JIRA)" <ji...@apache.org> on 2017/08/19 09:30:00 UTC

[jira] [Commented] (KYLIN-1480) NPE throws while execute sql with more than two join.

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

Shaofeng SHI commented on KYLIN-1480:
-------------------------------------

hi Yu, is this problem still in latest Kylin?

> 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)