本文整理了Java中org.apache.calcite.plan.RelOptUtil.decomposeDisjunction
方法的一些代码示例,展示了RelOptUtil.decomposeDisjunction
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RelOptUtil.decomposeDisjunction
方法的具体详情如下:
包路径:org.apache.calcite.plan.RelOptUtil
类名称:RelOptUtil
方法名:decomposeDisjunction
[英]Decomposes a predicate into a list of expressions that are OR'ed together.
[中]将一个谓词分解为一系列被或组合在一起的表达式。
代码示例来源:origin: org.apache.calcite/calcite-core
/**
* Returns a condition decomposed by OR.
*
* <p>For example, {@code disjunctions(FALSE)} returns the empty list.</p>
*/
public static List<RexNode> disjunctions(RexNode rexPredicate) {
final List<RexNode> list = new ArrayList<>();
decomposeDisjunction(rexPredicate, list);
return list;
}
代码示例来源:origin: Qihoo360/Quicksql
/**
* Returns a condition decomposed by OR.
*
* <p>For example, {@code disjunctions(FALSE)} returns the empty list.</p>
*/
public static List<RexNode> disjunctions(RexNode rexPredicate) {
final List<RexNode> list = new ArrayList<>();
decomposeDisjunction(rexPredicate, list);
return list;
}
代码示例来源:origin: Qihoo360/Quicksql
/**
* Decomposes a predicate into a list of expressions that are OR'ed
* together.
*
* @param rexPredicate predicate to be analyzed
* @param rexList list of decomposed RexNodes
*/
public static void decomposeDisjunction(
RexNode rexPredicate,
List<RexNode> rexList) {
if (rexPredicate == null || rexPredicate.isAlwaysFalse()) {
return;
}
if (rexPredicate.isA(SqlKind.OR)) {
for (RexNode operand : ((RexCall) rexPredicate).getOperands()) {
decomposeDisjunction(operand, rexList);
}
} else {
rexList.add(rexPredicate);
}
}
代码示例来源:origin: org.apache.calcite/calcite-core
/**
* Decomposes a predicate into a list of expressions that are OR'ed
* together.
*
* @param rexPredicate predicate to be analyzed
* @param rexList list of decomposed RexNodes
*/
public static void decomposeDisjunction(
RexNode rexPredicate,
List<RexNode> rexList) {
if (rexPredicate == null || rexPredicate.isAlwaysFalse()) {
return;
}
if (rexPredicate.isA(SqlKind.OR)) {
for (RexNode operand : ((RexCall) rexPredicate).getOperands()) {
decomposeDisjunction(operand, rexList);
}
} else {
rexList.add(rexPredicate);
}
}
代码示例来源:origin: Qihoo360/Quicksql
case OR:
final List<RexNode> ors = new ArrayList<>();
decomposeDisjunction(e, ors);
for (RexNode or : ors) {
switch (or.getKind()) {
代码示例来源:origin: org.apache.calcite/calcite-core
case OR:
final List<RexNode> ors = new ArrayList<>();
decomposeDisjunction(e, ors);
for (RexNode or : ors) {
switch (or.getKind()) {
内容来源于网络,如有侵权,请联系作者删除!