/** Creates a SOME sub-query. * * <p>There is no ALL. For {@code x comparison ALL (sub-query)} use instead * {@code NOT (x inverse-comparison SOME (sub-query))}. * If {@code comparison} is {@code >} * then {@code negated-comparison} is {@code <=}, and so forth. */ public static RexSubQuery some(RelNode rel, ImmutableList<RexNode> nodes, SqlQuantifyOperator op) { assert op.kind == SqlKind.SOME; final RelDataType type = type(rel, nodes); return new RexSubQuery(type, op, nodes, rel); }
/** Creates an IN sub-query. */ public static RexSubQuery in(RelNode rel, ImmutableList<RexNode> nodes) { final RelDataType type = type(rel, nodes); return new RexSubQuery(type, SqlStdOperatorTable.IN, nodes, rel); }
/** Creates an IN sub-query. */ public static RexSubQuery in(RelNode rel, ImmutableList<RexNode> nodes) { final RelDataType type = type(rel, nodes); return new RexSubQuery(type, SqlStdOperatorTable.IN, nodes, rel); }
/** Creates a SOME sub-query. * * <p>There is no ALL. For {@code x comparison ALL (sub-query)} use instead * {@code NOT (x inverse-comparison SOME (sub-query))}. * If {@code comparison} is {@code >} * then {@code negated-comparison} is {@code <=}, and so forth. */ public static RexSubQuery some(RelNode rel, ImmutableList<RexNode> nodes, SqlQuantifyOperator op) { assert op.kind == SqlKind.SOME; final RelDataType type = type(rel, nodes); return new RexSubQuery(type, op, nodes, rel); }