本文整理了Java中org.apache.calcite.plan.RelOptUtil.addTrait
方法的一些代码示例,展示了RelOptUtil.addTrait
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RelOptUtil.addTrait
方法的具体详情如下:
包路径:org.apache.calcite.plan.RelOptUtil
类名称:RelOptUtil
方法名:addTrait
暂无
代码示例来源:origin: org.apache.calcite/calcite-core
RelOptUtil.addTrait(
rel,
baseTraits.getTrait(i)));
代码示例来源:origin: Qihoo360/Quicksql
RelOptUtil.addTrait(
rel,
baseTraits.getTrait(i)));
代码示例来源:origin: Qihoo360/Quicksql
@Test public void testRuleMatchAfterConversion() {
VolcanoPlanner planner = new VolcanoPlanner();
planner.addRelTraitDef(ConventionTraitDef.INSTANCE);
planner.addRelTraitDef(ALT_TRAIT_DEF);
planner.addRule(new PhysToIteratorConverterRule());
planner.addRule(new PhysLeafRule());
planner.addRule(new IterSingleRule());
planner.addRule(new IterSinglePhysMergeRule());
RelOptCluster cluster = newCluster(planner);
NoneLeafRel noneLeafRel =
RelOptUtil.addTrait(
new NoneLeafRel(cluster, "noneLeafRel"), ALT_TRAIT);
NoneSingleRel noneRel =
RelOptUtil.addTrait(
new NoneSingleRel(cluster, noneLeafRel), ALT_EMPTY_TRAIT);
RelNode convertedRel =
planner.changeTraits(noneRel,
cluster.traitSetOf(EnumerableConvention.INSTANCE)
.replace(ALT_EMPTY_TRAIT));
planner.setRoot(convertedRel);
RelNode result = planner.chooseDelegate().findBestExp();
assertTrue(result instanceof IterMergedRel);
}
代码示例来源:origin: org.apache.calcite/calcite-core
@Test public void testRuleMatchAfterConversion() {
VolcanoPlanner planner = new VolcanoPlanner();
planner.addRelTraitDef(ConventionTraitDef.INSTANCE);
planner.addRelTraitDef(ALT_TRAIT_DEF);
planner.addRule(new PhysToIteratorConverterRule());
planner.addRule(new PhysLeafRule());
planner.addRule(new IterSingleRule());
planner.addRule(new IterSinglePhysMergeRule());
RelOptCluster cluster = newCluster(planner);
NoneLeafRel noneLeafRel =
RelOptUtil.addTrait(
new NoneLeafRel(cluster, "noneLeafRel"), ALT_TRAIT);
NoneSingleRel noneRel =
RelOptUtil.addTrait(
new NoneSingleRel(cluster, noneLeafRel), ALT_EMPTY_TRAIT);
RelNode convertedRel =
planner.changeTraits(noneRel,
cluster.traitSetOf(EnumerableConvention.INSTANCE)
.replace(ALT_EMPTY_TRAIT));
planner.setRoot(convertedRel);
RelNode result = planner.chooseDelegate().findBestExp();
assertTrue(result instanceof IterMergedRel);
}
代码示例来源:origin: Qihoo360/Quicksql
RelOptUtil.addTrait(
new NoneLeafRel(cluster, "noneLeafRel"), ALT_TRAIT);
RelOptUtil.addTrait(
new NoneSingleRel(cluster, noneLeafRel), ALT_TRAIT2);
代码示例来源:origin: org.apache.calcite/calcite-core
RelOptUtil.addTrait(
new NoneLeafRel(cluster, "noneLeafRel"), ALT_TRAIT);
RelOptUtil.addTrait(
new NoneSingleRel(cluster, noneLeafRel), ALT_TRAIT2);
代码示例来源:origin: org.apache.calcite/calcite-core
RelOptUtil.addTrait(
new NoneLeafRel(cluster, "noneLeafRel"), ALT_TRAIT);
RelOptUtil.addTrait(
new NoneSingleRel(cluster, noneLeafRel), ALT_TRAIT2);
代码示例来源:origin: Qihoo360/Quicksql
RelOptUtil.addTrait(
new NoneLeafRel(cluster, "noneLeafRel"), ALT_TRAIT);
RelOptUtil.addTrait(
new NoneSingleRel(cluster, noneLeafRel), ALT_TRAIT2);
内容来源于网络,如有侵权,请联系作者删除!