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/12/08 13:44:00 UTC

[jira] [Commented] (KYLIN-3091) A problem about retention rate analyze

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

Shaofeng SHI commented on KYLIN-3091:
-------------------------------------

[~sunyerui]] Yerui, could you please check this issue? Thanks!

> A problem about retention rate analyze
> --------------------------------------
>
>                 Key: KYLIN-3091
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3091
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v2.0.0
>         Environment: hbase 0.98.8-hadoop2
>            Reporter: WangSheng
>            Assignee: liyang
>
> I found that kylin supported retention rate analyze function, so I made some test for this function. The following SQL executed successful:
> {code:java}
> select city, version,
> intersect_count(uuid, dt, array['20161014', '20161015']) as retention_oneday,
> intersect_count(uuid, dt, array['20161014', '20161015', '20161016']) as retention_twoday
> from visit_log
> where dt in ('2016104', '20161015', '20161016')
> group by city, version
> {code}
> but, other SQLs executed failed like this:
> {code:java}
> select city,
> intersect_count(uuid, dt, array['20161014', '20161015']) as retention_oneday
> from visit_log 
> where dt in ('2016104', '20161015',) 
> group by city, version
> select city, version,
> intersect_count(uuid, dt, array['20161014', '20161015', '20161016']) as retention_twoday
> from visit_log 
> where dt in ('2016104', '20161015', '20161016') 
> group by city, version
> {code}
> which means I cannot use just one intersect_count UDAF in a SQL, at lease two intersect_count. My kylin version is kylin 2.0.0-hbase 0.98.8, and here is the error log:
> {code:java}
> Caused by: java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
>         at java.util.ArrayList.rangeCheck(ArrayList.java:635)
>         at java.util.ArrayList.get(ArrayList.java:411)
>         at org.apache.kylin.query.relnode.ColumnRowType.getColumnByIndex(ColumnRowType.java:49)
>         at org.apache.kylin.query.relnode.OLAPAggregateRel.fillbackOptimizedColumn(OLAPAggregateRel.java:396)
>         at org.apache.kylin.query.relnode.OLAPAggregateRel.buildRewriteFieldsAndMetricsColumns(OLAPAggregateRel.java:347)
>         at org.apache.kylin.query.relnode.OLAPAggregateRel.implementRewrite(OLAPAggregateRel.java:283)
>         at org.apache.kylin.query.relnode.OLAPRel$RewriteImplementor.visitChild(OLAPRel.java:158)
>         at org.apache.kylin.query.relnode.OLAPLimitRel.implementRewrite(OLAPLimitRel.java:107)
>         at org.apache.kylin.query.relnode.OLAPRel$RewriteImplementor.visitChild(OLAPRel.java:158)
>         at org.apache.kylin.query.relnode.OLAPToEnumerableConverter.implement(OLAPToEnumerableConverter.java:100)
>         at org.apache.calcite.adapter.enumerable.EnumerableRelImplementor.implementRoot(EnumerableRelImplementor.java:108)
>         at org.apache.calcite.adapter.enumerable.EnumerableInterpretable.toBindable(EnumerableInterpretable.java:92)
>         at org.apache.calcite.prepare.CalcitePrepareImpl$CalcitePreparingStmt.implement(CalcitePrepareImpl.java:1248)
>         at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:306)
>         at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:203)
>         at org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:776)
>         at org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:632)
>         at org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:602)
>         at org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:214)
>         at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:595)
>         at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:615)
>         at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:148)
> {code}



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