[ https://issues.apache.org/jira/browse/CALCITE-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde updated CALCITE-1005: --------------------------------- Summary: NullPointerException in getMaxRowCount for Aggregate (was: NullPointerException in RelMdMaxRowCount) > NullPointerException in getMaxRowCount for Aggregate > ---------------------------------------------------- > > Key: CALCITE-1005 > URL: https://issues.apache.org/jira/browse/CALCITE-1005 > Project: Calcite > Issue Type: Bug > Components: core > Affects Versions: 1.6.0 > Reporter: Mike Hinchey > Assignee: Julian Hyde > > After commit 24b0747 for CALCITE-987, I get an error from a test in my own > project, but the test is all copied from calcite. > The query is this: > with > t1(x) as (select * from (values 1,2, case when 1 = 1 then null else 3 end)), > t2(x) as (select * from (values 1,case when 1 = 1 then null else 3 end)) > select * > from t1 > where t1.x not in (select t2.x from t2); > I took that from core/src/test/resources/sql/subquery.oq, and I'm running > with the CsvSchemaFactory and TRANSLATABLE. > Abbreviated stacktrace (most of it is reflection noise): > ... > at > org.apache.calcite.rel.metadata.RelMetadataQuery.getRowCount(RelMetadataQuery.java:86) > at org.apache.calcite.plan.hep.HepPlanner.dumpGraph(HepPlanner.java:958) > at > org.apache.calcite.plan.hep.HepPlanner.applyTransformationResults(HepPlanner.java:723) > at org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:518) > at > org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:392) > at > org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:255) > at > org.apache.calcite.plan.hep.HepInstruction$RuleInstance.execute(HepInstruction.java:125) > at > org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:207) > at > org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:194) > ... more > at > org.apache.calcite.rel.metadata.RelMetadataQuery.getRowCount(RelMetadataQuery.java:86) > at > org.apache.calcite.rel.core.Filter.estimateFilteredRows(Filter.java:156) > at > org.apache.calcite.rel.core.Filter.estimateFilteredRows(Filter.java:150) > at org.apache.calcite.rel.core.Calc.getRows(Calc.java:135) > at > org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:144) > ... 50 more > at > org.apache.calcite.rel.metadata.RelMetadataQuery.getMaxRowCount(RelMetadataQuery.java:101) > at > org.apache.calcite.rel.metadata.RelMdUtil.getJoinRowCount(RelMdUtil.java:705) > at org.apache.calcite.rel.core.Join.getRows(Join.java:175) > at > org.apache.calcite.rel.metadata.RelMdRowCount.getRowCount(RelMdRowCount.java:144) > ... 90 more > at > org.apache.calcite.rel.metadata.RelMetadataQuery.getMaxRowCount(RelMetadataQuery.java:101) > at > org.apache.calcite.rel.metadata.RelMdMaxRowCount.getMaxRowCount(RelMdMaxRowCount.java:108) > ... 105 more > Caused by: java.lang.NullPointerException > at > org.apache.calcite.rel.metadata.RelMdMaxRowCount.getMaxRowCount(RelMdMaxRowCount.java:102) > ... 125 more -- This message was sent by Atlassian JIRA (v6.3.4#6332)