Class FullUnorderedScanExpression
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.expressions.FullUnorderedScanExpression
-
- All Implemented Interfaces:
Bindable
,Correlated<RelationalExpression>
,PlannerGraphRewritable
,RelationalExpression
@API(EXPERIMENTAL) public class FullUnorderedScanExpression extends Object implements RelationalExpression, PlannerGraphRewritable
A planner expression representing a full, unordered scan of the records by primary key, which is the logical version of aRecordQueryScanPlan
withScanComparisons.EMPTY
. Unlike aRecordQueryScanPlan
, aFullUnorderedScanExpression
is not implicitly ordered by the primary key.This expression is useful as the source of records for the initial planner expression produced from a
RecordQuery
.
-
-
Constructor Summary
Constructors Constructor Description FullUnorderedScanExpression(Set<String> recordTypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
boolean
equalsWithoutChildren(RelationalExpression otherExpression, AliasMap equivalencesMap)
Set<CorrelationIdentifier>
getCorrelatedTo()
Returns the set ofCorrelationIdentifier
s this entity is correlated to.List<? extends Quantifier>
getQuantifiers()
Return an iterator of references to the children of this planner expression.Set<String>
getRecordTypes()
int
hashCode()
int
hashCodeWithoutChildren()
FullUnorderedScanExpression
rebase(AliasMap translationMap)
Rebases this and all other objects this objects is composed of using a given translation map.PlannerGraph
rewritePlannerGraph(List<? extends PlannerGraph> childGraphs)
Method to rewrite the planner graph.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.temp.RelationalExpression
acceptPropertyVisitor, bindTo, canCorrelate, semanticEquals, semanticEquals, semanticHashCode, show
-
-
-
-
Method Detail
-
getQuantifiers
@Nonnull public List<? extends Quantifier> getQuantifiers()
Description copied from interface:RelationalExpression
Return an iterator of references to the children of this planner expression. The iterators returned by different calls are guaranteed to be independent (i.e., advancing one will not advance another). However, they might point to the same object, as whenCollections.emptyIterator()
is returned. The returned iterator should be treated as an immutable object and may throw an exception ifIterator.remove()
is called. The iterator must return its elements in a consistent order.- Specified by:
getQuantifiers
in interfaceRelationalExpression
- Returns:
- an iterator of references to the children of this planner expression
-
getCorrelatedTo
@Nonnull public Set<CorrelationIdentifier> getCorrelatedTo()
Description copied from interface:Correlated
Returns the set ofCorrelationIdentifier
s this entity is correlated to. This means that without a process that binds these correlations to values, theRelationalExpression
(or others that implement this interface) cannot even in principle produce a meaningful result. As often times entities that implement this interface use composition and effectively describe trees or DAGs, this method should be the set union of theCorrelationIdentifier
s this object is correlated to as well as all children, constituent parts, etc.- Specified by:
getCorrelatedTo
in interfaceCorrelated<RelationalExpression>
- Returns:
- the set of
CorrelationIdentifier
s this entity is correlated to
-
rebase
@Nonnull public FullUnorderedScanExpression rebase(@Nonnull AliasMap translationMap)
Description copied from interface:Correlated
Rebases this and all other objects this objects is composed of using a given translation map.- Specified by:
rebase
in interfaceCorrelated<RelationalExpression>
- Parameters:
translationMap
- a map defining a translation fromCorrelationIdentifier
sids
toCorrelationIdentifier
sids'
. After the rebase, every correlation to anid
containedids
that is contained or referred to directly or indirectly bythis
must have been transformed to use the mapped counterpart ofid
id'
inids'
. IDs not contained in the translation map must remain unmodified by the rebase operation.- Returns:
- a new entity that has been rebased
-
equalsWithoutChildren
public boolean equalsWithoutChildren(@Nonnull RelationalExpression otherExpression, @Nonnull AliasMap equivalencesMap)
- Specified by:
equalsWithoutChildren
in interfaceRelationalExpression
-
hashCodeWithoutChildren
public int hashCodeWithoutChildren()
- Specified by:
hashCodeWithoutChildren
in interfaceRelationalExpression
-
rewritePlannerGraph
@Nonnull public PlannerGraph rewritePlannerGraph(@Nonnull List<? extends PlannerGraph> childGraphs)
Description copied from interface:PlannerGraphRewritable
Method to rewrite the planner graph.- Specified by:
rewritePlannerGraph
in interfacePlannerGraphRewritable
- Parameters:
childGraphs
- planner graphs of children expression that already have been computed- Returns:
- a new planner graph that can combine the
childGraph
s in a meaningful way. Note that there is no obligation to use thechildGraph
s at all, this method can create a new independent planner graph completely from scratch.
-
-