kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yerui Sun (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KYLIN-1372) Query using PrepareStatement failed with multi OR clause
Date Tue, 26 Jan 2016 13:57:39 GMT

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

Yerui Sun updated KYLIN-1372:
-----------------------------
    Summary: Query using PrepareStatement failed with multi OR clause  (was: Query with PrepareStatement
failed with OR clause)

> Query using PrepareStatement failed with multi OR clause
> --------------------------------------------------------
>
>                 Key: KYLIN-1372
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1372
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: v2.0, v1.2
>            Reporter: Yerui Sun
>            Assignee: Yerui Sun
>             Fix For: v1.3
>
>
> Query using prepare statement, with filter 'where lstg_format_name in (?, ?)', exception
threw:
> {code}
> Caused by: java.util.NoSuchElementException
>         at java.util.HashMap$HashIterator.nextNode(HashMap.java:1431)
>         at java.util.HashMap$KeyIterator.next(HashMap.java:1453)
>         at org.apache.kylin.metadata.filter.CompareTupleFilter.addChild(CompareTupleFilter.java:84)
>         at org.apache.kylin.query.relnode.OLAPFilterRel$TupleFilterVisitor.mergeToInClause(OLAPFilterRel.java:159)
>         at org.apache.kylin.query.relnode.OLAPFilterRel$TupleFilterVisitor.visitCall(OLAPFilterRel.java:126)
>         at org.apache.kylin.query.relnode.OLAPFilterRel$TupleFilterVisitor.visitCall(OLAPFilterRel.java:45)
>         at org.apache.calcite.rex.RexCall.accept(RexCall.java:107)
>         at org.apache.kylin.query.relnode.OLAPFilterRel$TupleFilterVisitor.visitCall(OLAPFilterRel.java:117)
>         at org.apache.kylin.query.relnode.OLAPFilterRel$TupleFilterVisitor.visitCall(OLAPFilterRel.java:45)
>         at org.apache.calcite.rex.RexCall.accept(RexCall.java:107)
>         at org.apache.kylin.query.relnode.OLAPFilterRel.translateFilter(OLAPFilterRel.java:257)
>         at org.apache.kylin.query.relnode.OLAPFilterRel.implementOLAP(OLAPFilterRel.java:241)
>         at org.apache.kylin.query.relnode.OLAPRel$OLAPImplementor.visitChild(OLAPRel.java:81)
>         at org.apache.kylin.query.relnode.OLAPProjectRel.implementOLAP(OLAPProjectRel.java:100)
>         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.CalciteConnectionImpl.prepareStatement(CalciteConnectionImpl.java:158)
>         ... 84 more
> {code}
> If using with filter 'where lstg_format_name in ('FP-GTC', ?)', query succeed, but the
result only contained 'FP-GTC' row, the dynamic filter seems didn't work.
> The reason is, with multi OR clause, OLAPFilterRel.mergeToInClause was called to merge
into one In clause, but the new CompareTupleFilter lost dynamic variables. 
> I'll fix this issue later.



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

Mime
View raw message