dynamobi/dynamobi — Issue #570: [FRG-302] Internal error in HepRelVertex.computeSelfCost
Author: dynamobi-build
Created: 2011-12-30 03:35:51+00:00
State: open
Labels: FRG, Planner Framework

[reporter="jhyde", created="Sun, 30 Dec 2007 02:16:02 -0500 (GMT-05:00)"]
The metadata framework for Hep seems to have a leak. If you enable tracing, dumpGraph calls getCumulativeCost, and you get an Internal error "should never get here" from HepRelVertex.computeSelfCost.

It is easy to reproduce. Set

org.eigenbase.relopt.RelOptPlanner.level=FINER

run HepPlannerTest, and all 8 tests fail with the same exception. Stack dump as follows:

Testcase: testRuleClass took 1.717 sec

FAILED

Internal error: (unknown cause)

junit.framework.AssertionFailedError: Internal error: (unknown cause)

at org.eigenbase.util.Util.newInternal(Util.java:849)

at org.eigenbase.util.Util.newInternal(Util.java:837)

at org.eigenbase.rel.metadata.ReflectiveRelMetadataProvider.getRelMetadata(ReflectiveRelMetadataProvider.java:112)

at org.eigenbase.rel.metadata.ChainedRelMetadataProvider.getRelMetadata(ChainedRelMetadataProvider.java:76)

at org.eigenbase.rel.metadata.RelMetadataQuery.getCumulativeCost(RelMetadataQuery.java:128)

at org.eigenbase.relopt.AbstractRelOptPlanner.getCost(AbstractRelOptPlanner.java:208)

at org.eigenbase.relopt.hep.HepPlanner.dumpGraph(HepPlanner.java:863)

at org.eigenbase.relopt.hep.HepPlanner.setRoot(HepPlanner.java:117)

at org.eigenbase.test.RelOptTestBase.checkPlanning(RelOptTestBase.java:152)

at org.eigenbase.test.RelOptTestBase.checkPlanning(RelOptTestBase.java:89)

at org.eigenbase.test.HepPlannerTest.testRuleClass(HepPlannerTest.java:69)

Caused by: java.lang.reflect.InvocationTargetException

at org.eigenbase.rel.metadata.ReflectiveRelMetadataProvider.getRelMetadata(ReflectiveRelMetadataProvider.java:104)

at org.eigenbase.util.Util.newInternal(Util.java:849)

at org.eigenbase.util.Util.newInternal(Util.java:837)

at org.eigenbase.rel.metadata.ReflectiveRelMetadataProvider.getRelMetadata(ReflectiveRelMetadataProvider.java:112)

at org.eigenbase.rel.metadata.ChainedRelMetadataProvider.getRelMetadata(ChainedRelMetadataProvider.java:76)

at org.eigenbase.rel.metadata.RelMetadataQuery.getCumulativeCost(RelMetadataQuery.java:128)

at org.eigenbase.rel.metadata.RelMdPercentageOriginalRows.getCumulativeCost(RelMdPercentageOriginalRows.java:146)

Caused by: java.lang.reflect.InvocationTargetException

at org.eigenbase.rel.metadata.ReflectiveRelMetadataProvider.getRelMetadata(ReflectiveRelMetadataProvider.java:104)

at org.eigenbase.util.Util.newInternal(Util.java:849)

at org.eigenbase.util.Util.newInternal(Util.java:837)

at org.eigenbase.rel.metadata.ReflectiveRelMetadataProvider.getRelMetadata(ReflectiveRelMetadataProvider.java:112)

at org.eigenbase.rel.metadata.ChainedRelMetadataProvider.getRelMetadata(ChainedRelMetadataProvider.java:76)

at org.eigenbase.rel.metadata.RelMetadataQuery.getNonCumulativeCost(RelMetadataQuery.java:149)

at org.eigenbase.rel.metadata.RelMdPercentageOriginalRows.getCumulativeCost(RelMdPercentageOriginalRows.java:143)

Caused by: java.lang.reflect.InvocationTargetException

at org.eigenbase.rel.metadata.ReflectiveRelMetadataProvider.getRelMetadata(ReflectiveRelMetadataProvider.java:104)

at org.eigenbase.util.Util.newInternal(Util.java:832)

at org.eigenbase.relopt.hep.HepRelVertex.computeSelfCost(HepRelVertex.java:71)

at org.eigenbase.rel.metadata.RelMdPercentageOriginalRows.getNonCumulativeCost(RelMdPercentageOriginalRows.java:154)