• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java RelOptRuleOperand类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.calcite.plan.RelOptRuleOperand的典型用法代码示例。如果您正苦于以下问题:Java RelOptRuleOperand类的具体用法?Java RelOptRuleOperand怎么用?Java RelOptRuleOperand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RelOptRuleOperand类属于org.apache.calcite.plan包,在下文中一共展示了RelOptRuleOperand类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: fireRules

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
/**
 * Fires all rules matched by a relational expression.
 *
 * @param rel      Relational expression which has just been created (or maybe
 *                 from the queue)
 * @param deferred If true, each time a rule matches, just add an entry to
 *                 the queue.
 */
void fireRules(
    RelNode rel,
    boolean deferred) {
  for (RelOptRuleOperand operand : classOperands.get(rel.getClass())) {
    if (operand.matches(rel)) {
      final VolcanoRuleCall ruleCall;
      if (deferred) {
        ruleCall = new DeferringRuleCall(this, operand);
      } else {
        ruleCall = new VolcanoRuleCall(this, operand);
      }
      ruleCall.match(rel);
    }
  }
}
 
开发者ID:apache,项目名称:calcite,代码行数:24,代码来源:VolcanoPlanner.java


示例2: match

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
/**
 * Matches a relational expression to a rule.
 *
 * @param operand  Root operand of rule
 * @param rel      Relational expression
 * @param bindings Bindings, populated on successful match
 * @return whether relational expression matched rule
 */
private boolean match(
    RelOptRuleOperand operand,
    RelNode rel,
    List<RelNode> bindings) {
  if (!operand.matches(rel)) {
    return false;
  }
  bindings.add(rel);
  switch (operand.childPolicy) {
  case ANY:
    return true;
  }
  List<RelOptRuleOperand> childOperands = operand.getChildOperands();
  List<? extends RelNode> childRels = rel.getInputs();
  if (childOperands.size() != childRels.size()) {
    return false;
  }
  for (Pair<RelOptRuleOperand, ? extends RelNode> pair
      : Pair.zip(childOperands, childRels)) {
    if (!match(pair.left, pair.right, bindings)) {
      return false;
    }
  }
  return true;
}
 
开发者ID:apache,项目名称:calcite,代码行数:34,代码来源:MockRelOptPlanner.java


示例3: FilterJoinRule

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
/**
 * Creates a FilterProjectTransposeRule with an explicit root operand and
 * factories.
 */
protected FilterJoinRule(RelOptRuleOperand operand, String id, boolean smart, RelBuilderFactory relBuilderFactory,
        Predicate predicate) {
    super(operand, relBuilderFactory, "FilterJoinRule:" + id);
    this.smart = smart;
    this.predicate = Preconditions.checkNotNull(predicate);
}
 
开发者ID:apache,项目名称:kylin,代码行数:11,代码来源:FilterJoinRule.java


示例4: JoinProjectTransposeRule

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
/** Creates a JoinProjectTransposeRule. */
public JoinProjectTransposeRule(RelOptRuleOperand operand,
    String description, boolean includeOuter,
    RelBuilderFactory relBuilderFactory) {
  super(operand, relBuilderFactory, description);
  this.includeOuter = includeOuter;
}
 
开发者ID:apache,项目名称:calcite,代码行数:8,代码来源:JoinProjectTransposeRule.java


示例5: AbstractMaterializedViewRule

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
/** Creates a AbstractMaterializedViewRule. */
protected AbstractMaterializedViewRule(RelOptRuleOperand operand,
    RelBuilderFactory relBuilderFactory, String description,
    boolean generateUnionRewriting) {
  super(operand, relBuilderFactory, description);
  this.generateUnionRewriting = generateUnionRewriting;
}
 
开发者ID:apache,项目名称:calcite,代码行数:8,代码来源:AbstractMaterializedViewRule.java


示例6: FilterProjectTransposeRule

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
protected FilterProjectTransposeRule(
    RelOptRuleOperand operand,
    boolean copyFilter,
    boolean copyProject,
    RelBuilderFactory relBuilderFactory) {
  super(operand, relBuilderFactory, null);
  this.copyFilter = copyFilter;
  this.copyProject = copyProject;
}
 
开发者ID:apache,项目名称:calcite,代码行数:10,代码来源:FilterProjectTransposeRule.java


示例7: MultiJoinProjectTransposeRule

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
/** Creates a MultiJoinProjectTransposeRule. */
public MultiJoinProjectTransposeRule(
    RelOptRuleOperand operand,
    RelBuilderFactory relBuilderFactory,
    String description) {
  super(operand, description, false, relBuilderFactory);
}
 
开发者ID:apache,项目名称:calcite,代码行数:8,代码来源:MultiJoinProjectTransposeRule.java


示例8: FilterJoinRule

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
/**
 * Creates a FilterProjectTransposeRule with an explicit root operand and
 * factories.
 */
protected FilterJoinRule(RelOptRuleOperand operand, String id,
    boolean smart, RelBuilderFactory relBuilderFactory, Predicate predicate) {
  super(operand, relBuilderFactory, "FilterJoinRule:" + id);
  this.smart = smart;
  this.predicate = Preconditions.checkNotNull(predicate);
}
 
开发者ID:apache,项目名称:calcite,代码行数:11,代码来源:FilterJoinRule.java


示例9: removeRule

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
public boolean removeRule(RelOptRule rule) {
  if (!ruleSet.remove(rule)) {
    // Rule was not present.
    return false;
  }

  // Remove description.
  unmapRuleDescription(rule);

  // Remove operands.
  for (Iterator<RelOptRuleOperand> iter = classOperands.values().iterator();
       iter.hasNext();) {
    RelOptRuleOperand entry = iter.next();
    if (entry.getRule().equals(rule)) {
      iter.remove();
    }
  }

  // Remove trait mappings. (In particular, entries from conversion
  // graph.)
  if (rule instanceof ConverterRule) {
    ConverterRule converterRule = (ConverterRule) rule;
    final RelTrait ruleTrait = converterRule.getInTrait();
    final RelTraitDef ruleTraitDef = ruleTrait.getTraitDef();
    if (traitDefs.contains(ruleTraitDef)) {
      ruleTraitDef.deregisterConverterRule(this, converterRule);
    }
  }
  return true;
}
 
开发者ID:apache,项目名称:calcite,代码行数:31,代码来源:VolcanoPlanner.java


示例10: onNewClass

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
@Override protected void onNewClass(RelNode node) {
  super.onNewClass(node);

  // Create mappings so that instances of this class will match existing
  // operands.
  final Class<? extends RelNode> clazz = node.getClass();
  for (RelOptRule rule : ruleSet) {
    for (RelOptRuleOperand operand : rule.getOperands()) {
      if (operand.getMatchedClass().isAssignableFrom(clazz)) {
        classOperands.put(clazz, operand);
      }
    }
  }
}
 
开发者ID:apache,项目名称:calcite,代码行数:15,代码来源:VolcanoPlanner.java


示例11: VolcanoRuleCall

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
/**
 * Creates a rule call.
 *
 * @param planner Planner
 * @param operand First operand of the rule
 */
VolcanoRuleCall(
    VolcanoPlanner planner,
    RelOptRuleOperand operand) {
  this(
      planner,
      operand,
      new RelNode[operand.getRule().operands.size()],
      ImmutableMap.<RelNode, List<RelNode>>of());
}
 
开发者ID:apache,项目名称:calcite,代码行数:16,代码来源:VolcanoRuleCall.java


示例12: VolcanoRuleMatch

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
/**
 * Creates a <code>VolcanoRuleMatch</code>.
 *
 * @param operand0 Primary operand
 * @param rels     List of targets; copied by the constructor, so the client
 *                 can modify it later
 * @param nodeInputs Map from relational expressions to their inputs
 */
VolcanoRuleMatch(VolcanoPlanner volcanoPlanner, RelOptRuleOperand operand0,
    RelNode[] rels, Map<RelNode, List<RelNode>> nodeInputs) {
  super(volcanoPlanner, operand0, rels.clone(), nodeInputs);
  assert allNotNull(rels, Litmus.THROW);

  // Try to deduce which subset the result will belong to. Assume --
  // for now -- that the set is the same as the root relexp.
  targetSet = volcanoPlanner.getSet(rels[0]);
  assert targetSet != null : rels[0].toString() + " isn't in a set";
  digest = computeDigest();
}
 
开发者ID:apache,项目名称:calcite,代码行数:20,代码来源:VolcanoRuleMatch.java


示例13: HepRuleCall

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
HepRuleCall(
    RelOptPlanner planner,
    RelOptRuleOperand operand,
    RelNode[] rels,
    Map<RelNode, List<RelNode>> nodeChildren,
    List<RelNode> parents) {
  super(planner, operand, rels, nodeChildren, parents);

  results = new ArrayList<RelNode>();
}
 
开发者ID:apache,项目名称:calcite,代码行数:11,代码来源:HepRuleCall.java


示例14: MockRuleCall

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
/**
 * Creates a MockRuleCall.
 *
 * @param planner Planner
 * @param operand Operand
 * @param rels    List of matched relational expressions
 */
MockRuleCall(
    RelOptPlanner planner,
    RelOptRuleOperand operand,
    RelNode[] rels) {
  super(
      planner,
      operand,
      rels,
      Collections.<RelNode, List<RelNode>>emptyMap());
}
 
开发者ID:apache,项目名称:calcite,代码行数:18,代码来源:MockRelOptPlanner.java


示例15: PruneScanRule

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
public PruneScanRule(RelOptRuleOperand operand, String id, OptimizerRulesContext optimizerContext) {
  super(operand, id);
  this.optimizerContext = optimizerContext;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:PruneScanRule.java


示例16: any

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
public static RelOptRuleOperand any(Class<? extends RelNode> first, RelTrait trait){
  return RelOptRule.operand(first, trait, RelOptRule.any());
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:4,代码来源:RelOptHelper.java


示例17: some

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
public static RelOptRuleOperand some(Class<? extends RelNode> rel, RelOptRuleOperand first, RelOptRuleOperand... rest){
  return RelOptRule.operand(rel, RelOptRule.some(first, rest));
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:4,代码来源:RelOptHelper.java


示例18: DrillReduceAggregatesRule

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
protected DrillReduceAggregatesRule(RelOptRuleOperand operand) {
  super(operand);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:4,代码来源:DrillReduceAggregatesRule.java


示例19: AggPruleBase

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
protected AggPruleBase(RelOptRuleOperand operand, String description) {
  super(operand, description);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:4,代码来源:AggPruleBase.java


示例20: Prule

import org.apache.calcite.plan.RelOptRuleOperand; //导入依赖的package包/类
public Prule(RelOptRuleOperand operand, String description) {
  super(operand, description);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:4,代码来源:Prule.java



注:本文中的org.apache.calcite.plan.RelOptRuleOperand类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RMNodeCleanContainerEvent类代码示例发布时间:2022-05-22
下一篇:
Java WithName类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap