: null; final Blackboard seekBb = createBlackboard(seekScope, null, false); RelNode seekRel = convertQueryOrInList(seekBb, seek, targetDataType);
: null; final Blackboard seekBb = createBlackboard(seekScope, null, false); RelNode seekRel = convertQueryOrInList(seekBb, seek, targetDataType);
/** * 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); }
/** * 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); }
((SqlValidatorImpl) validator).setValidatedNodeType(list, multisetType.getComponentType()); input = convertQueryOrInList(usedBb, list, null); break; case MULTISET_QUERY_CONSTRUCTOR:
((SqlValidatorImpl) validator).setValidatedNodeType(list, multisetType.getComponentType()); input = convertQueryOrInList(usedBb, list, null); break; case MULTISET_QUERY_CONSTRUCTOR:
((SqlValidatorImpl) validator).setValidatedNodeType(list, multisetType.getComponentType()); input = convertQueryOrInList(usedBb, list, null); break; case MULTISET_QUERY_CONSTRUCTOR:
((SqlValidatorImpl) validator).setValidatedNodeType(list, multisetType.getComponentType()); input = convertQueryOrInList(usedBb, list, null); break; case MULTISET_QUERY_CONSTRUCTOR: