本文整理汇总了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);
}
示例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);
}
示例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));
}