Class GeophilePointWithinDistanceQueryPlan
java.lang.Object
com.apple.foundationdb.record.spatial.geophile.GeophileSpatialObjectQueryPlan
com.apple.foundationdb.record.spatial.geophile.GeophilePointWithinDistanceQueryPlan
- All Implemented Interfaces:
PlanHashable,PlanSerializable,Correlated<RelationalExpression>,com.apple.foundationdb.record.query.plan.cascades.explain.PlannerGraphRewritable,RelationalExpression,Narrowable<RelationalExpression>,com.apple.foundationdb.record.query.plan.cascades.typing.Typed,QueryPlan<FDBQueriedRecord<Message>>,RecordQueryPlan,RecordQueryPlanWithIndex,RecordQueryPlanWithMatchCandidate,RecordQueryPlanWithNoChildren
@API(EXPERIMENTAL)
public class GeophilePointWithinDistanceQueryPlan
extends GeophileSpatialObjectQueryPlan
Query spatial index for points (latitude, longitude) within a given distance (inclusive) of a given center.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.query.plan.cascades.Correlated
Correlated.BoundEquivalence<S extends Correlated<S>>Nested classes/interfaces inherited from interface com.apple.foundationdb.record.PlanHashable
PlanHashable.PlanHashKind, PlanHashable.PlanHashModeNested classes/interfaces inherited from interface com.apple.foundationdb.record.query.plan.cascades.expressions.RelationalExpression
RelationalExpression.CombineFunction<R extends Object,S extends Object>, RelationalExpression.CombinePredicate -
Field Summary
Fields inherited from interface com.apple.foundationdb.record.PlanHashable
CURRENT_FOR_CONTINUATION, CURRENT_LEGACYFields inherited from interface com.apple.foundationdb.record.query.plan.plans.QueryPlan
UNKNOWN_MAX_CARDINALITY -
Constructor Summary
ConstructorsConstructorDescriptionGeophilePointWithinDistanceQueryPlan(DoubleValueOrParameter centerLatitude, DoubleValueOrParameter centerLongitude, DoubleValueOrParameter distance, String indexName, ScanComparisons prefixComparisons, boolean covering) -
Method Summary
Modifier and TypeMethodDescriptioncom.apple.foundationdb.record.query.plan.cascades.explain.PlannerGraphcreateIndexPlannerGraph(RecordQueryPlan identity, com.apple.foundationdb.record.query.plan.cascades.explain.NodeInfo nodeInfo, List<String> additionalDetails, Map<String, com.apple.foundationdb.record.query.plan.cascades.explain.Attribute> additionalAttributeMap) booleanequalsWithoutChildren(RelationalExpression otherExpression, AliasMap equivalencesMap) protected com.geophile.z.SpatialJoin.Filter<com.geophile.z.index.RecordWithSpatialObject,com.apple.foundationdb.record.spatial.geophile.GeophileRecordImpl> getFilter(EvaluationContext context) Get a optional filter to eliminate false positives from the spatial join.protected BiFunction<IndexEntry,Tuple, com.apple.foundationdb.record.spatial.geophile.GeophileRecordImpl> Get the function to use for mappingIndexEntrytoGeophileRecordImpl.protected com.geophile.z.SpatialObjectgetSpatialObject(EvaluationContext context) Get the spatial object with which to join spatial index entries.intintcom.apple.foundationdb.record.query.plan.cascades.explain.PlannerGraphrewritePlannerGraph(List<? extends com.apple.foundationdb.record.query.plan.cascades.explain.PlannerGraph> childGraphs) toProto(PlanSerializationContext serializationContext) com.apple.foundationdb.record.planprotos.PRecordQueryPlantoRecordQueryPlanProto(PlanSerializationContext serializationContext) Methods inherited from class com.apple.foundationdb.record.spatial.geophile.GeophileSpatialObjectQueryPlan
equals, executeEntries, getComplexity, getCorrelatedTo, getIndexName, getMatchCandidateMaybe, getPrefixComparisons, getQuantifiers, getScanType, getUsedIndexes, hasFullRecordScan, hashCode, hasIndexScan, hasLoadBykeys, hasRecordScan, isReverse, logPlanStructure, translateCorrelationsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.apple.foundationdb.record.query.plan.cascades.Correlated
isCorrelatedToMethods inherited from interface com.apple.foundationdb.record.query.plan.cascades.Narrowable
narrowMaybeMethods inherited from interface com.apple.foundationdb.record.PlanHashable
planHash, planHashMethods inherited from interface com.apple.foundationdb.record.query.plan.plans.QueryPlan
collectDescendantPlans, execute, execute, isStrictlySorted, maxCardinalityMethods inherited from interface com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan
accept, canBeMinimized, execute, execute, execute, execute, getQueryPlanChildren, minimize, minimize, structuralEquals, structuralEquals, structuralHashCodeMethods inherited from interface com.apple.foundationdb.record.query.plan.plans.RecordQueryPlanWithIndex
allowedForCoveringIndexPlan, executePlan, fetchIndexRecords, strictlySortedMethods inherited from interface com.apple.foundationdb.record.query.plan.plans.RecordQueryPlanWithMatchCandidate
getMatchCandidateMethods inherited from interface com.apple.foundationdb.record.query.plan.plans.RecordQueryPlanWithNoChildren
getChildrenMethods inherited from interface com.apple.foundationdb.record.query.plan.cascades.expressions.RelationalExpression
acceptVisitor, adjustMatch, bindIdentities, canCorrelate, compensate, enumerateUnboundCorrelatedTo, exactlySubsumedBy, findMatches, getCorrelationOrder, getDynamicTypes, getMatchedQuantifiers, getResultType, hasIncompatibleBoundQuantifiers, hasUnboundQuantifiers, isCompatiblyAndCompletelyBound, match, match, rebase, semanticEquals, semanticEquals, semanticEqualsForResults, semanticHashCode, show, showExploratory, subsumedBy, withQuantifiersMethods inherited from interface com.apple.foundationdb.record.query.plan.cascades.typing.Typed
describe
-
Constructor Details
-
GeophilePointWithinDistanceQueryPlan
public GeophilePointWithinDistanceQueryPlan(@Nonnull DoubleValueOrParameter centerLatitude, @Nonnull DoubleValueOrParameter centerLongitude, @Nonnull DoubleValueOrParameter distance, @Nonnull String indexName, @Nonnull ScanComparisons prefixComparisons, boolean covering)
-
-
Method Details
-
getSpatialObject
@Nullable protected com.geophile.z.SpatialObject getSpatialObject(@Nonnull EvaluationContext context) Description copied from class:GeophileSpatialObjectQueryPlanGet the spatial object with which to join spatial index entries.- Specified by:
getSpatialObjectin classGeophileSpatialObjectQueryPlan- Parameters:
context- query context containing parameter bindings- Returns:
- a spatial object to use in spatial join or
nullif some bound parameter is null.
-
getFilter
@Nullable protected com.geophile.z.SpatialJoin.Filter<com.geophile.z.index.RecordWithSpatialObject,com.apple.foundationdb.record.spatial.geophile.GeophileRecordImpl> getFilter(@Nonnull EvaluationContext context) Description copied from class:GeophileSpatialObjectQueryPlanGet a optional filter to eliminate false positives from the spatial join. The filter will have access only to theSpatialObjectfor the join and theGeophileRecordImplfor the index entry. If the index is covering,GeophileRecordImpl.spatialObject()will then be available. If there is no filter, or the filter is not entirely effective, someQueryComponentform of the original predicate will almost certainly be needed downstream of theSpatialObjectQueryPlan.- Overrides:
getFilterin classGeophileSpatialObjectQueryPlan- Parameters:
context- query context containing parameter bindings- Returns:
- a spatial join filter or
nullif none is possible
-
getRecordFunction
protected BiFunction<IndexEntry,Tuple, getRecordFunction()com.apple.foundationdb.record.spatial.geophile.GeophileRecordImpl> Description copied from class:GeophileSpatialObjectQueryPlanGet the function to use for mappingIndexEntrytoGeophileRecordImpl. If the index is covering, the indexedSpatialObjectmay be recoverable from the value part of the index entry.- Overrides:
getRecordFunctionin classGeophileSpatialObjectQueryPlan- Returns:
- a function that creates new
GeophileRecordImplinstances
-
getAvailableFields
-
getFetchIndexRecords
-
getResultValue
-
planHash
-
equalsWithoutChildren
public boolean equalsWithoutChildren(@Nonnull RelationalExpression otherExpression, @Nonnull AliasMap equivalencesMap) - Specified by:
equalsWithoutChildrenin interfaceRelationalExpression- Overrides:
equalsWithoutChildrenin classGeophileSpatialObjectQueryPlan
-
hashCodeWithoutChildren
public int hashCodeWithoutChildren()- Specified by:
hashCodeWithoutChildrenin interfaceRelationalExpression- Overrides:
hashCodeWithoutChildrenin classGeophileSpatialObjectQueryPlan
-
rewritePlannerGraph
@Nonnull public com.apple.foundationdb.record.query.plan.cascades.explain.PlannerGraph rewritePlannerGraph(@Nonnull List<? extends com.apple.foundationdb.record.query.plan.cascades.explain.PlannerGraph> childGraphs) -
createIndexPlannerGraph
@Nonnull public com.apple.foundationdb.record.query.plan.cascades.explain.PlannerGraph createIndexPlannerGraph(@Nonnull RecordQueryPlan identity, @Nonnull com.apple.foundationdb.record.query.plan.cascades.explain.NodeInfo nodeInfo, @Nonnull List<String> additionalDetails, @Nonnull Map<String, com.apple.foundationdb.record.query.plan.cascades.explain.Attribute> additionalAttributeMap) -
toProto
-
toRecordQueryPlanProto
@Nonnull public com.apple.foundationdb.record.planprotos.PRecordQueryPlan toRecordQueryPlanProto(@Nonnull PlanSerializationContext serializationContext)
-