Class RecordQueryInParameterJoinPlan
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.plans.RecordQueryInJoinPlan
-
- com.apple.foundationdb.record.query.plan.plans.RecordQueryInParameterJoinPlan
-
- All Implemented Interfaces:
PlanHashable
,QueryPlan<FDBQueriedRecord<Message>>
,RecordQueryPlan
,RecordQueryPlanWithChild
,RecordQueryPlanWithChildren
,Bindable
,Correlated<RelationalExpression>
,PlannerGraphRewritable
,RelationalExpressionWithChildren
,RelationalExpression
@API(INTERNAL) public class RecordQueryInParameterJoinPlan extends RecordQueryInJoinPlan
A query plan that executes a child plan once for each of the elements of anIN
list taken from a parameter.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.PlanHashable
PlanHashable.PlanHashKind
-
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.query.plan.temp.RelationalExpression
RelationalExpression.CombineFunction<R,S>, RelationalExpression.CombinePredicate
-
-
Field Summary
-
Fields inherited from class com.apple.foundationdb.record.query.plan.plans.RecordQueryInJoinPlan
bindingName, inner, sortReverse, sortValuesNeeded, VALUE_COMPARATOR
-
Fields inherited from interface com.apple.foundationdb.record.query.plan.plans.QueryPlan
UNKNOWN_MAX_CARDINALITY
-
-
Constructor Summary
Constructors Constructor Description RecordQueryInParameterJoinPlan(RecordQueryPlan plan, String bindingName, String externalBinding, boolean sortValues, boolean sortReverse)
RecordQueryInParameterJoinPlan(Quantifier.Physical inner, String bindingName, String externalBinding, boolean sortValues, boolean sortReverse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equalsWithoutChildren(RelationalExpression otherExpression, AliasMap equivalencesMap)
Set<CorrelationIdentifier>
getCorrelatedToWithoutChildren()
String
getExternalBinding()
protected List<Object>
getValues(EvaluationContext context)
int
hashCodeWithoutChildren()
void
logPlanStructure(StoreTimer timer)
Adds one to an appropriateStoreTimer
counter for each plan and subplan of this plan, allowing tracking of which plans are being chosen (e.g.int
planHash(PlanHashable.PlanHashKind hashKind)
Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.RecordQueryInParameterJoinPlan
rebaseWithRebasedQuantifiers(AliasMap translationMap, List<Quantifier> rebasedQuantifiers)
PlannerGraph
rewritePlannerGraph(List<? extends PlannerGraph> childGraphs)
Rewrite the planner graph for better visualization of a query index plan.String
toString()
-
Methods inherited from class com.apple.foundationdb.record.query.plan.plans.RecordQueryInJoinPlan
basePlanHash, equals, execute, getChild, getComplexity, getInnerPlan, getQuantifiers, hashCode, isReverse, isSorted, sortValues
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.apple.foundationdb.record.PlanHashable
planHash
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.plans.QueryPlan
execute, execute
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan
accept, execute, execute, execute, getQueryPlanChildren, structuralEquals, structuralEquals, structuralHashCode
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.plans.RecordQueryPlanWithChild
getAvailableFields, getChildren, getRelationalChildCount, getUsedIndexes, hasFullRecordScan, hasIndexScan, hasLoadBykeys, hasRecordScan, maxCardinality
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.temp.RelationalExpression
acceptPropertyVisitor, bindIdentities, bindTo, canCorrelate, enumerateUnboundCorrelatedTo, findMatches, match, semanticEquals, semanticEquals, semanticHashCode, show
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.temp.expressions.RelationalExpressionWithChildren
getCorrelatedTo, rebase
-
-
-
-
Constructor Detail
-
RecordQueryInParameterJoinPlan
public RecordQueryInParameterJoinPlan(RecordQueryPlan plan, String bindingName, String externalBinding, boolean sortValues, boolean sortReverse)
-
RecordQueryInParameterJoinPlan
public RecordQueryInParameterJoinPlan(Quantifier.Physical inner, String bindingName, String externalBinding, boolean sortValues, boolean sortReverse)
-
-
Method Detail
-
getValues
@Nullable protected List<Object> getValues(EvaluationContext context)
- Specified by:
getValues
in classRecordQueryInJoinPlan
-
getExternalBinding
public String getExternalBinding()
-
getCorrelatedToWithoutChildren
@Nonnull public Set<CorrelationIdentifier> getCorrelatedToWithoutChildren()
-
rebaseWithRebasedQuantifiers
@Nonnull public RecordQueryInParameterJoinPlan rebaseWithRebasedQuantifiers(@Nonnull AliasMap translationMap, @Nonnull List<Quantifier> rebasedQuantifiers)
-
equalsWithoutChildren
public boolean equalsWithoutChildren(@Nonnull RelationalExpression otherExpression, @Nonnull AliasMap equivalencesMap)
- Specified by:
equalsWithoutChildren
in interfaceRelationalExpression
- Overrides:
equalsWithoutChildren
in classRecordQueryInJoinPlan
-
hashCodeWithoutChildren
public int hashCodeWithoutChildren()
- Specified by:
hashCodeWithoutChildren
in interfaceRelationalExpression
- Overrides:
hashCodeWithoutChildren
in classRecordQueryInJoinPlan
-
planHash
public int planHash(@Nonnull PlanHashable.PlanHashKind hashKind)
Description copied from interface:PlanHashable
Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.- Parameters:
hashKind
- the "kind" of hash to calculate. Each kind of hash has a particular logic with regards to included and excluded items.- Returns:
- a stable hash code
-
logPlanStructure
public void logPlanStructure(StoreTimer timer)
Description copied from interface:QueryPlan
Adds one to an appropriateStoreTimer
counter for each plan and subplan of this plan, allowing tracking of which plans are being chosen (e.g. index scan vs. full scan).- Parameters:
timer
- the counters to increment
-
rewritePlannerGraph
@Nonnull public PlannerGraph rewritePlannerGraph(@Nonnull List<? extends PlannerGraph> childGraphs)
Rewrite the planner graph for better visualization of a query index plan.- Parameters:
childGraphs
- planner graphs of children expression that already have been computed- Returns:
- the rewritten planner graph that models this operator as a logical nested loop join joining an outer table of iterated values over a parameter in the IN clause to the correlated inner result of executing (usually) a index lookup for each bound outer value.
-
-