Class MultiColumnRestriction
java.lang.Object
org.apache.cassandra.cql3.restrictions.MultiColumnRestriction
- All Implemented Interfaces:
Restriction,SingleRestriction
- Direct Known Subclasses:
MultiColumnRestriction.EQRestriction,MultiColumnRestriction.INRestriction,MultiColumnRestriction.NotNullRestriction,MultiColumnRestriction.SliceRestriction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classAn IN restriction that uses a single marker for a set of IN values that are tuples.static classAn IN restriction that has a set of terms for in values.static classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<ColumnMetadata>The columns to which the restriction apply. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract SingleRestrictiondoMergeWith(SingleRestriction otherRestriction) final IndexfindSupportingIndex(IndexRegistry indexRegistry) Find first supporting index for current restrictionfindSupportingIndexFromQueryPlan(Index.QueryPlan indexQueryPlan) Find the first supporting index for the current restriction from anIndex.QueryPlan.Returns the column definitions in position order.protected final StringgetColumnsInCommons(Restriction otherRestriction) Returns the names of the columns that are specified within thisRestrictionsand the other one as a comma separatedString.Returns the definition of the first column.Returns the definition of the last column.final booleanhasSupportingIndex(IndexRegistry indexRegistry) Check if the restriction is on indexed columns.booleanprotected abstract booleanisSupportedBy(Index index, ColumnMetadata def) final SingleRestrictionmergeWith(SingleRestriction otherRestriction) Merges this restriction with the specified one.booleanneedsFiltering(Index.Group indexGroup) Returns whether this restriction would need filtering if the specified index group were used.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.cassandra.cql3.restrictions.Restriction
addFunctionsTo, addToRowFilter, isOnTokenMethods inherited from interface org.apache.cassandra.cql3.restrictions.SingleRestriction
appendBoundTo, appendTo, hasBound, isANN, isContains, isEQ, isEqualityBased, isIN, isInclusive, isLIKE, isNotNull, isSlice
-
Field Details
-
columnDefs
The columns to which the restriction apply.
-
-
Constructor Details
-
MultiColumnRestriction
-
-
Method Details
-
isMultiColumn
public boolean isMultiColumn()- Specified by:
isMultiColumnin interfaceSingleRestriction
-
getFirstColumn
Description copied from interface:RestrictionReturns the definition of the first column.- Specified by:
getFirstColumnin interfaceRestriction- Returns:
- the definition of the first column.
-
getLastColumn
Description copied from interface:RestrictionReturns the definition of the last column.- Specified by:
getLastColumnin interfaceRestriction- Returns:
- the definition of the last column.
-
getColumnDefs
Description copied from interface:RestrictionReturns the column definitions in position order.- Specified by:
getColumnDefsin interfaceRestriction- Returns:
- the column definitions in position order.
-
mergeWith
Description copied from interface:SingleRestrictionMerges this restriction with the specified one.Restriction are immutable. Therefore merging two restrictions result in a new one. The reason behind this choice is that it allow a great flexibility in the way the merging can done while preventing any side effect.
- Specified by:
mergeWithin interfaceSingleRestriction- Parameters:
otherRestriction- the restriction to merge into this one- Returns:
- the restriction resulting of the merge
-
doMergeWith
-
getColumnsInCommons
Returns the names of the columns that are specified within thisRestrictionsand the other one as a comma separatedString.- Parameters:
otherRestriction- the other restrictions- Returns:
- the names of the columns that are specified within this
Restrictionsand the other one as a comma separatedString.
-
hasSupportingIndex
Description copied from interface:RestrictionCheck if the restriction is on indexed columns.- Specified by:
hasSupportingIndexin interfaceRestriction- Parameters:
indexRegistry- the index registry- Returns:
trueif the restriction is on indexed columns,false
-
findSupportingIndex
Description copied from interface:RestrictionFind first supporting index for current restriction- Specified by:
findSupportingIndexin interfaceRestriction- Parameters:
indexRegistry- the index registry- Returns:
indexif the restriction is on indexed columns,null
-
findSupportingIndexFromQueryPlan
Description copied from interface:RestrictionFind the first supporting index for the current restriction from anIndex.QueryPlan.- Specified by:
findSupportingIndexFromQueryPlanin interfaceRestriction- Parameters:
indexQueryPlan- the index query plan- Returns:
indexif the restriction is on indexed columns,null
-
needsFiltering
Description copied from interface:RestrictionReturns whether this restriction would need filtering if the specified index group were used.- Specified by:
needsFilteringin interfaceRestriction- Parameters:
indexGroup- an index group- Returns:
trueif this would need filtering ifindexGroupwere used,falseotherwise
-
isSupportedBy
-
toString
-