当前位置: 首页>>代码示例>>Java>>正文


Java RelOptUtil.decomposeConjunction方法代码示例

本文整理汇总了Java中org.apache.calcite.plan.RelOptUtil.decomposeConjunction方法的典型用法代码示例。如果您正苦于以下问题:Java RelOptUtil.decomposeConjunction方法的具体用法?Java RelOptUtil.decomposeConjunction怎么用?Java RelOptUtil.decomposeConjunction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.calcite.plan.RelOptUtil的用法示例。


在下文中一共展示了RelOptUtil.decomposeConjunction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: simplifyAnds

import org.apache.calcite.plan.RelOptUtil; //导入方法依赖的package包/类
/**
 * Simplifies a conjunction of boolean expressions.
 */
public RexNode simplifyAnds(Iterable<? extends RexNode> nodes) {
  final List<RexNode> terms = new ArrayList<>();
  final List<RexNode> notTerms = new ArrayList<>();
  for (RexNode e : nodes) {
    RelOptUtil.decomposeConjunction(e, terms, notTerms);
  }
  simplifyList(terms);
  simplifyList(notTerms);
  if (unknownAsFalse) {
    return simplifyAnd2ForUnknownAsFalse(terms, notTerms);
  }
  return simplifyAnd2(terms, notTerms);
}
 
开发者ID:apache,项目名称:calcite,代码行数:17,代码来源:RexSimplify.java

示例2: simplifyAnd

import org.apache.calcite.plan.RelOptUtil; //导入方法依赖的package包/类
public RexNode simplifyAnd(RexCall e) {
  final List<RexNode> terms = new ArrayList<>();
  final List<RexNode> notTerms = new ArrayList<>();
  RelOptUtil.decomposeConjunction(e, terms, notTerms);
  simplifyList(terms);
  simplifyList(notTerms);
  if (unknownAsFalse) {
    return simplifyAnd2ForUnknownAsFalse(terms, notTerms);
  }
  return simplifyAnd2(terms, notTerms);
}
 
开发者ID:apache,项目名称:calcite,代码行数:12,代码来源:RexSimplify.java

示例3: split

import org.apache.calcite.plan.RelOptUtil; //导入方法依赖的package包/类
/** Splits this program into a list of project expressions and a list of
 * filter expressions.
 *
 * <p>Neither list is null.
 * The filters are evaluated first. */
public Pair<ImmutableList<RexNode>, ImmutableList<RexNode>> split() {
  final List<RexNode> filters = Lists.newArrayList();
  if (condition != null) {
    RelOptUtil.decomposeConjunction(expandLocalRef(condition), filters);
  }
  final ImmutableList.Builder<RexNode> projects = ImmutableList.builder();
  for (RexLocalRef project : this.projects) {
    projects.add(expandLocalRef(project));
  }
  return Pair.of(projects.build(), ImmutableList.copyOf(filters));
}
 
开发者ID:apache,项目名称:calcite,代码行数:17,代码来源:RexProgram.java


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