Package org.apache.calcite.plan
Class RelOptUtil.InputFinder
- All Implemented Interfaces:
RexVisitor<Void>
- Enclosing class:
RelOptUtil
Visitor which builds a bitmap of the inputs used by an expression.
-
Field Summary
Fields inherited from class org.apache.calcite.rex.RexVisitorImpl
deep -
Constructor Summary
ConstructorsConstructorDescriptionInputFinder(@Nullable Set<RelDataTypeField> extraFields) InputFinder(@Nullable Set<RelDataTypeField> extraFields, ImmutableBitSet initialBits) -
Method Summary
Modifier and TypeMethodDescriptionstatic RelOptUtil.InputFinderReturns an input finder that has analyzed a given expression.static RelOptUtil.InputFinderanalyze(RexNode node, Set<CorrelationId> localCorrelationIds) Returns an input finder that has analyzed a given expression, treatinglocalCorrelationIdsas the set of correlation ids bound by the current scope.static ImmutableBitSetReturns a bit set describing the inputs used by a collection of project expressions and an optional condition.static ImmutableBitSetReturns a bit set describing the inputs used by an expression.build()Returns the bit set.visitInputRef(RexInputRef inputRef) visitSubQuery(RexSubQuery subQuery) Methods inherited from class org.apache.calcite.rex.RexVisitorImpl
visitArrayAnd, visitArrayOr, visitCorrelVariable, visitDynamicParam, visitFieldAccess, visitLambda, visitLambdaRef, visitLiteral, visitLocalRef, visitNodeAndFieldIndex, visitOver, visitPatternFieldRef, visitRangeRef, visitTableInputRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.rex.RexVisitor
visitEach, visitList, visitList
-
Constructor Details
-
InputFinder
public InputFinder() -
InputFinder
-
InputFinder
-
-
Method Details
-
analyze
Returns an input finder that has analyzed a given expression. -
analyze
Returns an input finder that has analyzed a given expression, treatinglocalCorrelationIdsas the set of correlation ids bound by the current scope. For each nestedRexSubQuery, any correlation id used inside it that belongs to this set contributes itscorrelationColumnsindices to the bitmap; correlation ids bound by an outer scope are ignored, because their indices are relative to a foreign row type and would otherwise alias onto unrelated columns of the current scope. -
bits
Returns a bit set describing the inputs used by an expression. -
bits
Returns a bit set describing the inputs used by a collection of project expressions and an optional condition. -
build
Returns the bit set.After calling this method, you cannot do any more visits or call this method again.
-
visitInputRef
- Specified by:
visitInputRefin interfaceRexVisitor<Void>- Overrides:
visitInputRefin classRexVisitorImpl<Void>
-
visitCall
- Specified by:
visitCallin interfaceRexVisitor<Void>- Overrides:
visitCallin classRexVisitorImpl<Void>
-
visitSubQuery
- Specified by:
visitSubQueryin interfaceRexVisitor<Void>- Overrides:
visitSubQueryin classRexVisitorImpl<Void>
-