Collections.singletonList("this")); NoneSingleRel singleRel = new NoneSingleRel( cluster, projectRel);
Collections.singletonList("this")); NoneSingleRel singleRel = new NoneSingleRel( cluster, projectRel);
"a"); NoneSingleRel singleRel = new NoneSingleRel( cluster, leafRel);
"a"); NoneSingleRel singleRel = new NoneSingleRel( cluster, leafRel);
"a"); NoneSingleRel singleRel = new NoneSingleRel( cluster, leafRel);
"a"); NoneSingleRel singleRel = new NoneSingleRel( cluster, leafRel);
"a"); NoneSingleRel singleRel = new NoneSingleRel( cluster, leafRel);
/** * Tests transformation of a single+leaf from NONE to PHYS. In the past, * this one didn't work due to the definition of ReformedSingleRule. */ @Ignore // broken, because ReformedSingleRule matches child traits strictly @Test public void testTransformSingleReformed() { VolcanoPlanner planner = new VolcanoPlanner(); planner.addRelTraitDef(ConventionTraitDef.INSTANCE); planner.addRule(new PhysLeafRule()); planner.addRule(new ReformedSingleRule()); RelOptCluster cluster = newCluster(planner); NoneLeafRel leafRel = new NoneLeafRel( cluster, "a"); NoneSingleRel singleRel = new NoneSingleRel( cluster, leafRel); RelNode convertedRel = planner.changeTraits( singleRel, cluster.traitSetOf(PHYS_CALLING_CONVENTION)); planner.setRoot(convertedRel); RelNode result = planner.chooseDelegate().findBestExp(); assertTrue(result instanceof PhysSingleRel); }
/** * Tests transformation of a single+leaf from NONE to PHYS. In the past, * this one didn't work due to the definition of ReformedSingleRule. */ @Test public void testTransformSingleReformed() { VolcanoPlanner planner = new VolcanoPlanner(); planner.addRelTraitDef(ConventionTraitDef.instance); planner.addRule(new PhysLeafRule()); planner.addRule(new ReformedSingleRule()); RelOptCluster cluster = newCluster(planner); NoneLeafRel leafRel = new NoneLeafRel( cluster, "a"); NoneSingleRel singleRel = new NoneSingleRel( cluster, leafRel); RelNode convertedRel = planner.changeTraits( singleRel, cluster.traitSetOf(PHYS_CALLING_CONVENTION)); planner.setRoot(convertedRel); RelNode result = planner.chooseDelegate().findBestExp(); assertTrue(result instanceof PhysSingleRel); }
/** * Tests transformation of a single+leaf from NONE to PHYS. */ @Test public void testTransformSingleGood() { VolcanoPlanner planner = new VolcanoPlanner(); planner.addRelTraitDef(ConventionTraitDef.instance); planner.addRule(new PhysLeafRule()); planner.addRule(new GoodSingleRule()); RelOptCluster cluster = newCluster(planner); NoneLeafRel leafRel = new NoneLeafRel( cluster, "a"); NoneSingleRel singleRel = new NoneSingleRel( cluster, leafRel); RelNode convertedRel = planner.changeTraits( singleRel, cluster.traitSetOf(PHYS_CALLING_CONVENTION)); planner.setRoot(convertedRel); RelNode result = planner.chooseDelegate().findBestExp(); assertTrue(result instanceof PhysSingleRel); }
/** * Tests transformation of a single+leaf from NONE to PHYS. */ @Test public void testTransformSingleGood() { VolcanoPlanner planner = new VolcanoPlanner(); planner.addRelTraitDef(ConventionTraitDef.INSTANCE); planner.addRule(new PhysLeafRule()); planner.addRule(new GoodSingleRule()); RelOptCluster cluster = newCluster(planner); NoneLeafRel leafRel = new NoneLeafRel( cluster, "a"); NoneSingleRel singleRel = new NoneSingleRel( cluster, leafRel); RelNode convertedRel = planner.changeTraits( singleRel, cluster.traitSetOf(PHYS_CALLING_CONVENTION)); planner.setRoot(convertedRel); RelNode result = planner.chooseDelegate().findBestExp(); assertTrue(result instanceof PhysSingleRel); }
public void onMatch(RelOptRuleCall call) { NoneSingleRel singleRel = call.rel(0); RelNode childRel = singleRel.getChild(); RelNode physInput = convert( childRel, singleRel.getTraitSet().replace(PHYS_CALLING_CONVENTION)); call.transformTo( new PhysSingleRel( singleRel.getCluster(), physInput)); } }
public void onMatch(RelOptRuleCall call) { NoneSingleRel singleRel = call.rel(0); RelNode childRel = call.rel(1); RelNode physInput = convert( childRel, singleRel.getTraitSet().replace(PHYS_CALLING_CONVENTION)); call.transformTo( new PhysSingleRel( singleRel.getCluster(), physInput)); } }
public void onMatch(RelOptRuleCall call) { NoneSingleRel singleRel = call.rel(0); RelNode childRel = singleRel.getChild(); RelNode physInput = convert( childRel, singleRel.getTraitSet().replace(PHYS_CALLING_CONVENTION)); call.transformTo( new PhysSingleRel( singleRel.getCluster(), physInput)); } }
public void onMatch(RelOptRuleCall call) { NoneSingleRel singleRel = call.rel(0); PhysLeafRel leafRel = call.rel(1); call.transformTo( new PhysLeafRel( singleRel.getCluster(), "c")); } }
public void onMatch(RelOptRuleCall call) { NoneSingleRel singleRel = call.rel(0); RelNode childRel = call.rel(1); RelNode physInput = convert( childRel, singleRel.getTraitSet().replace(PHYS_CALLING_CONVENTION)); call.transformTo( new PhysSingleRel( singleRel.getCluster(), physInput)); } }
public RelNode copy(RelTraitSet traitSet, List<RelNode> inputs) { assert traitSet.comprises(Convention.NONE); return new NoneSingleRel( getCluster(), sole(inputs)); } }
public void onMatch(RelOptRuleCall call) { NoneSingleRel singleRel = call.rel(0); PhysLeafRel leafRel = call.rel(1); call.transformTo( new PhysLeafRel( singleRel.getCluster(), "c")); } }
public RelNode copy(RelTraitSet traitSet, List<RelNode> inputs) { assert traitSet.comprises(Convention.NONE); return new NoneSingleRel( getCluster(), sole(inputs)); } }