Package org.apache.calcite.plan.volcano
Class VolcanoPlannerTest
- java.lang.Object
-
- org.apache.calcite.plan.volcano.VolcanoPlannerTest
-
public class VolcanoPlannerTest extends java.lang.Object
Unit test forthe optimizer
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
VolcanoPlannerTest.GoodRemoveSingleRule
Planner rule that successfully removes aPlannerTests.PhysSingleRel
.private static class
VolcanoPlannerTest.PhysProjectRule
Planner rule that converts aLogicalProject
to PHYS convention.(package private) class
VolcanoPlannerTest.PhysToIteratorConverter
Converter from PHYS to ENUMERABLE convention.private static class
VolcanoPlannerTest.ReformedRemoveSingleRule
Planner rule that removes aPlannerTests.NoneSingleRel
.private static class
VolcanoPlannerTest.ReformedSingleRule
Planner rule that matches aPlannerTests.NoneSingleRel
whose input is aPlannerTests.PhysLeafRel
in a different subset.private static class
VolcanoPlannerTest.SubsetRule
Rule that matches aRelSubset
.private static class
VolcanoPlannerTest.TestListener
Implementation ofRelOptListener
.
-
Constructor Summary
Constructors Constructor Description VolcanoPlannerTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkEvent(java.util.List<org.apache.calcite.plan.RelOptListener.RelEvent> eventList, int iEvent, java.lang.Class expectedEventClass, org.apache.calcite.rel.RelNode expectedRel, java.lang.Class<? extends org.apache.calcite.plan.RelOptRule> expectedRuleClass)
private void
removeTrivialProject(boolean useRule)
private static <E extends java.lang.Comparable>
java.util.List<E>sort(E... es)
private static <E extends java.lang.Comparable>
java.util.List<E>sort(java.util.List<E> list)
void
testListener()
Tests whether planner correctly notifies listeners of events.void
testMergeJoin()
void
testRemoveSingleGood()
This always worked (in contrast to testRemoveSingleReformed) because it uses a completely-physical pattern (requiring GoodSingleRule to fire first).void
testRemoveSingleReformed()
Previously, this didn't work because ReformedRemoveSingleRule uses a pattern which spans calling conventions.void
testSubsetRule()
Tests a rule that is fired once per subset (whereas most rules are fired once per rel in a set or rel in a subset)void
testTransformLeaf()
Tests transformation of a leaf from NONE to PHYS.void
testTransformSingleGood()
Tests transformation of a single+leaf from NONE to PHYS.void
testTransformSingleReformed()
Tests transformation of a single+leaf from NONE to PHYS.void
testWithoutRemoveTrivialProject()
void
testWithRemoveTrivialProject()
-
-
-
Method Detail
-
testTransformLeaf
public void testTransformLeaf()
Tests transformation of a leaf from NONE to PHYS.
-
testTransformSingleGood
public void testTransformSingleGood()
Tests transformation of a single+leaf from NONE to PHYS.
-
testSubsetRule
public void testSubsetRule()
Tests a rule that is fired once per subset (whereas most rules are fired once per rel in a set or rel in a subset)
-
sort
private static <E extends java.lang.Comparable> java.util.List<E> sort(java.util.List<E> list)
-
sort
private static <E extends java.lang.Comparable> java.util.List<E> sort(E... es)
-
testTransformSingleReformed
public void testTransformSingleReformed()
Tests transformation of a single+leaf from NONE to PHYS. In the past, this one didn't work due to the definition of ReformedSingleRule.
-
removeTrivialProject
private void removeTrivialProject(boolean useRule)
-
testWithRemoveTrivialProject
public void testWithRemoveTrivialProject()
-
testWithoutRemoveTrivialProject
public void testWithoutRemoveTrivialProject()
-
testRemoveSingleReformed
public void testRemoveSingleReformed()
Previously, this didn't work because ReformedRemoveSingleRule uses a pattern which spans calling conventions.
-
testRemoveSingleGood
public void testRemoveSingleGood()
This always worked (in contrast to testRemoveSingleReformed) because it uses a completely-physical pattern (requiring GoodSingleRule to fire first).
-
testMergeJoin
public void testMergeJoin()
-
testListener
public void testListener()
Tests whether planner correctly notifies listeners of events.
-
checkEvent
private void checkEvent(java.util.List<org.apache.calcite.plan.RelOptListener.RelEvent> eventList, int iEvent, java.lang.Class expectedEventClass, org.apache.calcite.rel.RelNode expectedRel, java.lang.Class<? extends org.apache.calcite.plan.RelOptRule> expectedRuleClass)
-
-