Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
v1.0, v1.1, v1.2, v1.4.0
-
None
-
None
Description
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.