Package org.apache.cassandra.index
Class SingletonIndexQueryPlan
java.lang.Object
org.apache.cassandra.index.SingletonIndexQueryPlan
- All Implemented Interfaces:
Comparable<Index.QueryPlan>,Index.QueryPlan
- Direct Known Subclasses:
SASIIndexQueryPlan
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSingletonIndexQueryPlan(Index index, RowFilter postIndexFilter) -
Method Summary
Modifier and TypeMethodDescriptionprotected static SingletonIndexQueryPlanlongReturn an estimate of the number of results this plan is expected to return for any givenReadCommandthat it can be used to answer.getFirst()Returns the first index in this plan.Returns the indexes selected by this query plan, all of them belonging to the sameIndex.Group.Transform an initialRowFilterinto the filter that will still need to applied to a set of Rows after the index has performed it's initial scan.searcherFor(ReadCommand command) Factory method for query time search helper.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.index.Index.QueryPlan
compareTo, isTopK, postProcessor, shouldEstimateInitialConcurrency, supportsReplicaFilteringProtection, validate
-
Constructor Details
-
SingletonIndexQueryPlan
-
-
Method Details
-
create
-
getIndexes
Description copied from interface:Index.QueryPlanReturns the indexes selected by this query plan, all of them belonging to the sameIndex.Group. It should never be empty.- Specified by:
getIndexesin interfaceIndex.QueryPlan- Returns:
- the indexes selected by this query plan, which is never empty
-
getFirst
Description copied from interface:Index.QueryPlanReturns the first index in this plan.- Specified by:
getFirstin interfaceIndex.QueryPlan- Returns:
- the first index
-
getEstimatedResultRows
public long getEstimatedResultRows()Description copied from interface:Index.QueryPlanReturn an estimate of the number of results this plan is expected to return for any givenReadCommandthat it can be used to answer. Used bySecondaryIndexManager.getBestIndexQueryPlanFor(RowFilter)to determine theIndex.Groupwith the most selective plan for a givenRowFilter. Additionally, this is also used by StorageProxy.estimateResultsPerRange to calculate the initial concurrency factor for range requests- Specified by:
getEstimatedResultRowsin interfaceIndex.QueryPlan- Returns:
- the estimated average number of results a Searcher may return for any given command
-
searcherFor
Description copied from interface:Index.QueryPlanFactory method for query time search helper.- Specified by:
searcherForin interfaceIndex.QueryPlan- Parameters:
command- the read command being executed- Returns:
- an Searcher with which to perform the supplied command
-
postIndexQueryFilter
Description copied from interface:Index.QueryPlanTransform an initialRowFilterinto the filter that will still need to applied to a set of Rows after the index has performed it's initial scan. Used inReadCommand.executeLocally(ReadExecutionController)to reduce the amount of filtering performed on the results of the index query.- Specified by:
postIndexQueryFilterin interfaceIndex.QueryPlan- Returns:
- the (hopefully) reduced filter that would still need to be applied after the index was used to narrow the initial result set
-