Package org.apache.calcite.rex
Class RexSubQuery
java.lang.Object
org.apache.calcite.rex.RexNode
org.apache.calcite.rex.RexCall
org.apache.calcite.rex.RexSubQuery
public class RexSubQuery extends RexCall
Scalar expression that represents an IN, EXISTS or scalar sub-query.
-
Field Summary
-
Method Summary
Modifier and Type Method Description <R, P> R
accept(RexBiVisitor<R,P> visitor, P arg)
Accepts a visitor with a payload, dispatching to the right overloadedRexBiVisitor.visitInputRef(RexInputRef, Object)
visitXxx} method.<R> R
accept(RexVisitor<R> visitor)
Accepts a visitor, dispatching to the right overloadedvisitXxx
method.RexSubQuery
clone(RelNode rel)
RexSubQuery
clone(RelDataType type, List<RexNode> operands)
Creates a new call to the same operator with different operands.protected String
computeDigest(boolean withType)
boolean
equals(Object obj)
static RexSubQuery
exists(RelNode rel)
Creates an EXISTS sub-query.int
hashCode()
static RexSubQuery
in(RelNode rel, com.google.common.collect.ImmutableList<RexNode> nodes)
Creates an IN sub-query.static RexSubQuery
scalar(RelNode rel)
Creates a scalar sub-query.static RexSubQuery
some(RelNode rel, com.google.common.collect.ImmutableList<RexNode> nodes, SqlQuantifyOperator op)
Creates a SOME sub-query.Methods inherited from class org.apache.calcite.rex.RexCall
appendOperands, getKind, getOperands, getOperator, getType, isAlwaysFalse, isAlwaysTrue, nodeCount, toString
-
Field Details
-
Method Details
-
in
Creates an IN sub-query. -
some
public static RexSubQuery some(RelNode rel, com.google.common.collect.ImmutableList<RexNode> nodes, SqlQuantifyOperator op)Creates a SOME sub-query.There is no ALL. For
x comparison ALL (sub-query)
use insteadNOT (x inverse-comparison SOME (sub-query))
. Ifcomparison
is>
thennegated-comparison
is<=
, and so forth.Also =SOME is rewritten into IN
-
exists
Creates an EXISTS sub-query. -
scalar
Creates a scalar sub-query. -
accept
Description copied from class:RexNode
Accepts a visitor, dispatching to the right overloadedvisitXxx
method.Also see
RexUtil.apply(RexVisitor, java.util.List, RexNode)
, which applies a visitor to several expressions simultaneously. -
accept
Description copied from class:RexNode
Accepts a visitor with a payload, dispatching to the right overloadedRexBiVisitor.visitInputRef(RexInputRef, Object)
visitXxx} method. -
computeDigest
- Overrides:
computeDigest
in classRexCall
-
clone
Description copied from class:RexCall
Creates a new call to the same operator with different operands. -
clone
-
equals
Description copied from class:RexNode
Every node must implement
RexNode.equals(java.lang.Object)
based on its content -
hashCode
public int hashCode()Description copied from class:RexNode
Every node must implement
RexNode.hashCode()
consistent withRexNode.equals(java.lang.Object)
-