You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Yerui Sun (JIRA)" <ji...@apache.org> on 2016/05/24 07:27:12 UTC

[jira] [Created] (KYLIN-1732) Support Window Function

Yerui Sun created KYLIN-1732:
--------------------------------

             Summary: Support Window Function
                 Key: KYLIN-1732
                 URL: https://issues.apache.org/jira/browse/KYLIN-1732
             Project: Kylin
          Issue Type: Bug
          Components: Query Engine
    Affects Versions: v1.5.2
            Reporter: Yerui Sun
            Assignee: liyang


Kylin didn't support window function yet. Here's a test query:
{code}
select lstg_format_name, count(*) over(partition by lstg_format_name)
from kylin_sales
{code}
The query threw a exception and here's the error log and stack trace:
{code}
Error while executing SQL "select lstg_format_name, count(*) over(partition by lstg_format_name) from kylin_sales LIMIT 50000": cannot translate call COUNT() OVER (PARTITION BY $t3 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
{code}
{code}
Caused by: java.lang.RuntimeException: cannot translate call COUNT() OVER (PARTITION BY $t3 RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
        at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translateCall(RexToLixTranslator.java:533)
        at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate0(RexToLixTranslator.java:507)
        at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate(RexToLixTranslator.java:219)
        at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate0(RexToLixTranslator.java:472)
        at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate(RexToLixTranslator.java:219)
        at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate(RexToLixTranslator.java:214)
        at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translateList(RexToLixTranslator.java:700)
        at org.apache.calcite.adapter.enumerable.RexToLixTranslator.translateProjects(RexToLixTranslator.java:189)
        at org.apache.calcite.adapter.enumerable.EnumerableCalc.implement(EnumerableCalc.java:188)
        at org.apache.calcite.adapter.enumerable.EnumerableRelImplementor.visitChild(EnumerableRelImplementor.java:97)
        at org.apache.kylin.query.relnode.OLAPRel$JavaImplementor.visitChild(OLAPRel.java:183)
        at org.apache.calcite.adapter.enumerable.EnumerableLimit.implement(EnumerableLimit.java:106)
        at org.apache.calcite.adapter.enumerable.EnumerableRelImplementor.visitChild(EnumerableRelImplementor.java:97)
        at org.apache.kylin.query.relnode.OLAPRel$JavaImplementor.visitChild(OLAPRel.java:183)
        at org.apache.kylin.query.relnode.OLAPToEnumerableConverter.implement(OLAPToEnumerableConverter.java:108)
        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)
        at org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:721)
        at org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:588)
        at org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:558)
        at org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:214)
        at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:573)
        at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:571)
        at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:135)
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)