[ https://issues.apache.org/jira/browse/KYLIN-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15125946#comment-15125946 ]
hongbin ma commented on KYLIN-1372: ----------------------------------- due to historical reasons we're still maintaining another storage data structure called II (InvertedIndex) besides Cubes. ITIIQueryTest will use the II for all kinds of queries, and ITCombinationTest will use cubes. Notice they both extend from ITKylinQueryTest. So if you want to test the precise hll you'll need to make sure ITIIQueryTest cannot see " count(distinct leaf_categ_id)" , because there's no precise hll for II. If you have to test precise hll, put the test method in ITCombinationTest (only cube), rather than ITKylinQueryTest (common base). Maybe we'll need a renaming here to make it clearer > 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: v2.0, v1.3 > > Attachments: KYLIN-1372-1.x-staging.patch, > KYLIN-1372-2.x-staging.patch > > > 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)