org.apache.calcite.plan.RelOptUtil.addTrait()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(77)

本文整理了Java中org.apache.calcite.plan.RelOptUtil.addTrait方法的一些代码示例,展示了RelOptUtil.addTrait的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RelOptUtil.addTrait方法的具体详情如下:
包路径:org.apache.calcite.plan.RelOptUtil
类名称:RelOptUtil
方法名:addTrait

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);

相关文章

微信公众号

最新文章

更多

RelOptUtil类方法