Class StorageAttachedIndexQueryPlan
java.lang.Object
org.apache.cassandra.index.sai.plan.StorageAttachedIndexQueryPlan
- All Implemented Interfaces:
Comparable<Index.QueryPlan>,Index.QueryPlan
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreate(ColumnFamilyStore cfs, TableQueryMetrics queryMetrics, Set<StorageAttachedIndex> indexes, RowFilter filter) longReturn an estimate of the number of results this plan is expected to return for any givenReadCommandthat it can be used to answer.Returns the indexes selected by this query plan, all of them belonging to the sameIndex.Group.booleanisTopK()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.postProcessor(ReadCommand command) Called on coordinator after merging replica responses before returning to clientsearcherFor(ReadCommand command) Factory method for query time search helper.booleanUsed to determine whether to estimate initial concurrency during remote range reads.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, getFirst, supportsReplicaFilteringProtection, validate
-
Field Details
-
UNSUPPORTED_NON_STRICT_OPERATOR
- See Also:
-
-
Method Details
-
create
@Nullable public static StorageAttachedIndexQueryPlan create(ColumnFamilyStore cfs, TableQueryMetrics queryMetrics, Set<StorageAttachedIndex> indexes, RowFilter filter) -
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
-
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
-
shouldEstimateInitialConcurrency
public boolean shouldEstimateInitialConcurrency()Description copied from interface:Index.QueryPlanUsed to determine whether to estimate initial concurrency during remote range reads. Default is true, each implementation must override this method if they choose a different strategy.- Specified by:
shouldEstimateInitialConcurrencyin interfaceIndex.QueryPlan- Returns:
- true if the
Index.QueryPlanshould estimate initial concurrency, false otherwise
-
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
-
postProcessor
Called on coordinator after merging replica responses before returning to client- Specified by:
postProcessorin interfaceIndex.QueryPlan- Parameters:
command- the read command being executed
-
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:
- a filter with all the expressions that are user-defined or for a non-indexed partition key column
(currently index on partition columns is not supported, see
StorageAttachedIndex.validateOptions(Map, TableMetadata))
-
isTopK
public boolean isTopK()- Specified by:
isTopKin interfaceIndex.QueryPlan- Returns:
- true if given index query plan is a top-k request
-