本文整理汇总了Java中org.apache.calcite.plan.RelOptUtil.Logic方法的典型用法代码示例。如果您正苦于以下问题:Java RelOptUtil.Logic方法的具体用法?Java RelOptUtil.Logic怎么用?Java RelOptUtil.Logic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.calcite.plan.RelOptUtil
的用法示例。
在下文中一共展示了RelOptUtil.Logic方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: replaceSubQueries
import org.apache.calcite.plan.RelOptUtil; //导入方法依赖的package包/类
private void replaceSubQueries(
final Blackboard bb,
final SqlNode expr,
RelOptUtil.Logic logic) {
findSubQueries(bb, expr, logic, false);
for (SubQuery node : bb.subQueryList) {
substituteSubQuery(bb, node);
}
}
示例2: registerSubQuery
import org.apache.calcite.plan.RelOptUtil; //导入方法依赖的package包/类
void registerSubQuery(SqlNode node, RelOptUtil.Logic logic) {
for (SubQuery subQuery : subQueryList) {
if (node.equalsDeep(subQuery.node, Litmus.IGNORE)) {
return;
}
}
subQueryList.add(new SubQuery(node, logic));
}
示例3: replaceSubQueries
import org.apache.calcite.plan.RelOptUtil; //导入方法依赖的package包/类
private void replaceSubQueries(
final Blackboard bb,
final SqlNode expr,
RelOptUtil.Logic logic) {
findSubQueries(bb, expr, logic, false);
for (SubQuery node : bb.subQueryList) {
substituteSubQuery(bb, node);
}
}
示例4: registerSubQuery
import org.apache.calcite.plan.RelOptUtil; //导入方法依赖的package包/类
void registerSubQuery(SqlNode node, RelOptUtil.Logic logic) {
for (SubQuery subQuery : subQueryList) {
if (node.equalsDeep(subQuery.node, Litmus.IGNORE)) {
return;
}
}
subQueryList.add(new SubQuery(node, logic));
}
示例5: convertExists
import org.apache.calcite.plan.RelOptUtil; //导入方法依赖的package包/类
/**
* Converts an EXISTS or IN predicate into a join. For EXISTS, the sub-query
* produces an indicator variable, and the result is a relational expression
* which outer joins that indicator to the original query. After performing
* the outer join, the condition will be TRUE if the EXISTS condition holds,
* NULL otherwise.
*
* @param seek A query, for example 'select * from emp' or
* 'values (1,2,3)' or '('Foo', 34)'.
* @param subQueryType Whether sub-query is IN, EXISTS or scalar
* @param logic Whether the answer needs to be in full 3-valued logic (TRUE,
* FALSE, UNKNOWN) will be required, or whether we can accept an
* approximation (say representing UNKNOWN as FALSE)
* @param notIn Whether the operation is NOT IN
* @return join expression
*/
private RelOptUtil.Exists convertExists(
SqlNode seek,
RelOptUtil.SubQueryType subQueryType,
RelOptUtil.Logic logic,
boolean notIn,
RelDataType targetDataType) {
final SqlValidatorScope seekScope =
(seek instanceof SqlSelect)
? validator.getSelectScope((SqlSelect) seek)
: null;
final Blackboard seekBb = createBlackboard(seekScope, null, false);
RelNode seekRel = convertQueryOrInList(seekBb, seek, targetDataType);
return RelOptUtil.createExistsPlan(seekRel, subQueryType, logic, notIn);
}
示例6: SubQuery
import org.apache.calcite.plan.RelOptUtil; //导入方法依赖的package包/类
private SubQuery(SqlNode node, RelOptUtil.Logic logic) {
this.node = node;
this.logic = logic;
}
示例7: convertExists
import org.apache.calcite.plan.RelOptUtil; //导入方法依赖的package包/类
/**
* Converts an EXISTS or IN predicate into a join. For EXISTS, the sub-query
* produces an indicator variable, and the result is a relational expression
* which outer joins that indicator to the original query. After performing
* the outer join, the condition will be TRUE if the EXISTS condition holds,
* NULL otherwise.
*
* @param seek A query, for example 'select * from emp' or
* 'values (1,2,3)' or '('Foo', 34)'.
* @param subQueryType Whether sub-query is IN, EXISTS or scalar
* @param logic Whether the answer needs to be in full 3-valued logic (TRUE,
* FALSE, UNKNOWN) will be required, or whether we can accept an
* approximation (say representing UNKNOWN as FALSE)
* @param notIn Whether the operation is NOT IN
* @return join expression
*/
private RelOptUtil.Exists convertExists(
SqlNode seek,
RelOptUtil.SubQueryType subQueryType,
RelOptUtil.Logic logic,
boolean notIn,
RelDataType targetDataType) {
final SqlValidatorScope seekScope =
(seek instanceof SqlSelect)
? validator.getSelectScope((SqlSelect) seek)
: null;
final Blackboard seekBb = createBlackboard(seekScope, null, false);
RelNode seekRel = convertQueryOrInList(seekBb, seek, targetDataType);
return RelOptUtil.createExistsPlan(seekRel, subQueryType, logic, notIn);
}
示例8: SubQuery
import org.apache.calcite.plan.RelOptUtil; //导入方法依赖的package包/类
private SubQuery(SqlNode node, RelOptUtil.Logic logic) {
this.node = node;
this.logic = logic;
}