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.
  • Constructor Details

  • Method Details

    • getSpatialObject

      @Nullable protected com.geophile.z.SpatialObject getSpatialObject(@Nonnull EvaluationContext context)
      Description copied from class: GeophileSpatialObjectQueryPlan
      Get the spatial object with which to join spatial index entries.
      Specified by:
      getSpatialObject in class GeophileSpatialObjectQueryPlan
      Parameters:
      context - query context containing parameter bindings
      Returns:
      a spatial object to use in spatial join or null if 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: GeophileSpatialObjectQueryPlan
      Get a optional filter to eliminate false positives from the spatial join. The filter will have access only to the SpatialObject for the join and the GeophileRecordImpl for 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, some QueryComponent form of the original predicate will almost certainly be needed downstream of the SpatialObjectQueryPlan.
      Overrides:
      getFilter in class GeophileSpatialObjectQueryPlan
      Parameters:
      context - query context containing parameter bindings
      Returns:
      a spatial join filter or null if none is possible
    • getRecordFunction

      protected BiFunction<IndexEntry,Tuple,com.apple.foundationdb.record.spatial.geophile.GeophileRecordImpl> getRecordFunction()
      Description copied from class: GeophileSpatialObjectQueryPlan
      Get the function to use for mapping IndexEntry to GeophileRecordImpl. If the index is covering, the indexed SpatialObject may be recoverable from the value part of the index entry.
      Overrides:
      getRecordFunction in class GeophileSpatialObjectQueryPlan
      Returns:
      a function that creates new GeophileRecordImpl instances
    • getAvailableFields

      @Nonnull public AvailableFields getAvailableFields()
    • getFetchIndexRecords

      @Nonnull public RecordQueryFetchFromPartialRecordPlan.FetchIndexRecords getFetchIndexRecords()
    • getResultValue

      @Nonnull public Value getResultValue()
    • planHash

      public int planHash(@Nonnull PlanHashable.PlanHashMode mode)
    • equalsWithoutChildren

      public boolean equalsWithoutChildren(@Nonnull RelationalExpression otherExpression, @Nonnull AliasMap equivalencesMap)
      Specified by:
      equalsWithoutChildren in interface RelationalExpression
      Overrides:
      equalsWithoutChildren in class GeophileSpatialObjectQueryPlan
    • hashCodeWithoutChildren

      public int hashCodeWithoutChildren()
      Specified by:
      hashCodeWithoutChildren in interface RelationalExpression
      Overrides:
      hashCodeWithoutChildren in class GeophileSpatialObjectQueryPlan
    • 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

      @Nonnull public Message toProto(@Nonnull PlanSerializationContext serializationContext)
    • toRecordQueryPlanProto

      @Nonnull public com.apple.foundationdb.record.planprotos.PRecordQueryPlan toRecordQueryPlanProto(@Nonnull PlanSerializationContext serializationContext)