本文整理了Java中org.apache.calcite.plan.RelOptUtil.createExistsPlan
方法的一些代码示例,展示了RelOptUtil.createExistsPlan
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RelOptUtil.createExistsPlan
方法的具体详情如下:
包路径:org.apache.calcite.plan.RelOptUtil
类名称:RelOptUtil
方法名:createExistsPlan
[英]Creates a plan suitable for use in EXISTS
or IN
statements.
[中]创建适合在EXISTS
或IN
语句中使用的计划。
代码示例来源:origin: org.apache.calcite/calcite-core
@Deprecated // to be removed before 2.0
public static Exists createExistsPlan(
RelNode seekRel,
SubQueryType subQueryType,
Logic logic,
boolean notIn) {
final RelBuilder relBuilder =
RelFactories.LOGICAL_BUILDER.create(seekRel.getCluster(), null);
return createExistsPlan(seekRel, subQueryType, logic, notIn, relBuilder);
}
代码示例来源:origin: Qihoo360/Quicksql
@Deprecated // to be removed before 2.0
public static Exists createExistsPlan(
RelNode seekRel,
SubQueryType subQueryType,
Logic logic,
boolean notIn) {
final RelBuilder relBuilder =
RelFactories.LOGICAL_BUILDER.create(seekRel.getCluster(), null);
return createExistsPlan(seekRel, subQueryType, logic, notIn, relBuilder);
}
代码示例来源:origin: Qihoo360/Quicksql
RelNode seekRel = convertQueryOrInList(seekBb, seek, targetDataType);
return RelOptUtil.createExistsPlan(seekRel,
subQueryType, logic, notIn, relBuilder);
代码示例来源:origin: org.apache.flink/flink-table_2.10
/**
* 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);
}
代码示例来源:origin: org.apache.kylin/atopcalcite
/**
* 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);
}
代码示例来源:origin: org.apache.calcite/calcite-core
RelNode seekRel = convertQueryOrInList(seekBb, seek, targetDataType);
return RelOptUtil.createExistsPlan(seekRel,
subQueryType, logic, notIn, relBuilder);
内容来源于网络,如有侵权,请联系作者删除!