Class RecordQueryCoveringIndexPlan

    • Method Detail

      • isReverse

        public boolean isReverse()
        Description copied from interface: QueryPlan
        Indicates whether this plan will return values in "reverse" order from the natural order of results of this plan. The return value is true if the plan returns elements in descending order and false if the elements are returned in ascending order.
        Specified by:
        isReverse in interface QueryPlan<FDBQueriedRecord<Message>>
        Returns:
        true if this plan returns elements in reverse order
      • hasRecordScan

        public boolean hasRecordScan()
        Description copied from interface: QueryPlan
        Indicates whether this plan (or one of its components) scans at least a subset of the record range directly rather than going through a secondary index. A plan may only scan over a subset of all records. Someone might not use any secondary indexes explicitly, but they might make use of the primary key index. For example, if they had a compound primary key, and they issued a query for all records that had some value for the first element of their primary key, the planner will produce a plan which scans over a subset of all records.
        Specified by:
        hasRecordScan in interface QueryPlan<FDBQueriedRecord<Message>>
        Returns:
        true if this plan (or one of its components) scans at least a subset of the records directly
      • hasFullRecordScan

        public boolean hasFullRecordScan()
        Description copied from interface: QueryPlan
        Indicates whether this plan (or one of its components) must perform a scan over all records in the store directly rather than going through a secondary index. See hasRecordScan for the comparison between two methods.
        Specified by:
        hasFullRecordScan in interface QueryPlan<FDBQueriedRecord<Message>>
        Returns:
        true if this plan (or one of its components) must perform a scan over all records in the store directly
      • hasIndexScan

        public boolean hasIndexScan​(@Nonnull
                                    String indexName)
        Description copied from interface: QueryPlan
        Indicates whether this plan scans the given index.
        Specified by:
        hasIndexScan in interface QueryPlan<FDBQueriedRecord<Message>>
        Parameters:
        indexName - the name of the index to check for
        Returns:
        true if this plan (or one of its children) scans the given index
      • hasLoadBykeys

        public boolean hasLoadBykeys()
        Description copied from interface: QueryPlan
        Indicates whether this plan (or one of its components) loads records by their primary key.
        Specified by:
        hasLoadBykeys in interface QueryPlan<FDBQueriedRecord<Message>>
        Returns:
        true if this plan (or one of its components) loads records by their primary key
      • rebase

        @Nonnull
        public RecordQueryCoveringIndexPlan 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 interface Correlated<RelationalExpression>
        Parameters:
        translationMap - a map defining a translation from CorrelationIdentifiers ids to CorrelationIdentifiers ids'. After the rebase, every correlation to an id contained ids that is contained or referred to directly or indirectly by this must have been transformed to use the mapped counterpart of id id' in ids'. IDs not contained in the translation map must remain unmodified by the rebase operation.
        Returns:
        a new entity that has been rebased
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • logPlanStructure

        public void logPlanStructure​(StoreTimer timer)
        Description copied from interface: QueryPlan
        Adds one to an appropriate StoreTimer counter for each plan and subplan of this plan, allowing tracking of which plans are being chosen (e.g. index scan vs. full scan).
        Specified by:
        logPlanStructure in interface QueryPlan<FDBQueriedRecord<Message>>
        Parameters:
        timer - the counters to increment
      • getComplexity

        public int getComplexity()
        Description copied from interface: QueryPlan
        Returns an integer representing the "complexity" of the generated plan. Currently, this should simply be the number of plans in the plan tree with this plan as the root (i.e. the number of descendants of this plan, including itself).
        Specified by:
        getComplexity in interface QueryPlan<FDBQueriedRecord<Message>>
        Returns:
        the complexity of this plan
      • planHash

        public int planHash()
        Description copied from interface: PlanHashable
        Return a hash similar to hashCode, but with the additional guarantee that is is stable across JVMs.
        Specified by:
        planHash in interface PlanHashable
        Returns:
        a stable hash code
      • 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 when Collections.emptyIterator() is returned. The returned iterator should be treated as an immutable object and may throw an exception if Iterator.remove() is called. The iterator must return its elements in a consistent order.
        Specified by:
        getQuantifiers in interface RecordQueryPlanWithNoChildren
        Specified by:
        getQuantifiers in interface RelationalExpression
        Returns:
        an iterator of references to the children of this planner expression
      • 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 interface PlannerGraphRewritable
        Parameters:
        childGraphs - planner graphs of children expression that already have been computed
        Returns:
        a new planner graph that can combine the childGraphs in a meaningful way. Note that there is no obligation to use the childGraphs at all, this method can create a new independent planner graph completely from scratch.