Class Selectable.WithVector
- java.lang.Object
-
- org.apache.cassandra.cql3.selection.Selectable.WithArrayLiteral
-
- org.apache.cassandra.cql3.selection.Selectable.WithVector
-
- All Implemented Interfaces:
AssignmentTestable
,Selectable
- Enclosing interface:
- Selectable
public static class Selectable.WithVector extends Selectable.WithArrayLiteral
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.cql3.selection.Selectable.WithArrayLiteral
Selectable.WithArrayLiteral.Raw
-
Nested classes/interfaces inherited from interface org.apache.cassandra.cql3.AssignmentTestable
AssignmentTestable.TestResult
-
Nested classes/interfaces inherited from interface org.apache.cassandra.cql3.selection.Selectable
Selectable.BetweenParenthesesOrWithTuple, Selectable.RawIdentifier, Selectable.WithArrayLiteral, Selectable.WithCast, Selectable.WithElementSelection, Selectable.WithFieldSelection, Selectable.WithFunction, Selectable.WithList, Selectable.WithMapOrUdt, Selectable.WithSet, Selectable.WithSliceSelection, Selectable.WithTerm, Selectable.WithTypeHint, Selectable.WithVector, Selectable.WritetimeOrTTL
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.cql3.selection.Selectable.WithArrayLiteral
selectables
-
-
Constructor Summary
Constructors Constructor Description WithVector(java.util.List<Selectable> selectables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractType<?>
getCompatibleTypeIfKnown(java.lang.String keyspace)
AbstractType<?>
getExactTypeIfKnown(java.lang.String keyspace)
The type of theSelectable
if it can be infered.Selector.Factory
newSelectorFactory(TableMetadata cfm, AbstractType<?> expectedType, java.util.List<ColumnMetadata> defs, VariableSpecifications boundNames)
boolean
selectColumns(java.util.function.Predicate<ColumnMetadata> predicate)
Checks if thisSelectable
select columns matching the specified predicate.AssignmentTestable.TestResult
testAssignment(java.lang.String keyspace, ColumnSpecification receiver)
java.lang.String
toString()
-
Methods inherited from class org.apache.cassandra.cql3.selection.Selectable.WithArrayLiteral
getSize
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.cql3.selection.Selectable
addAndGetIndex, processesSelection, specForElementOrSlice
-
-
-
-
Constructor Detail
-
WithVector
public WithVector(java.util.List<Selectable> selectables)
-
-
Method Detail
-
testAssignment
public AssignmentTestable.TestResult testAssignment(java.lang.String keyspace, ColumnSpecification receiver)
- Specified by:
testAssignment
in interfaceAssignmentTestable
- Specified by:
testAssignment
in interfaceSelectable
- Overrides:
testAssignment
in classSelectable.WithArrayLiteral
- Returns:
- whether this object can be assigned to the provided receiver. We distinguish between 3 values: - EXACT_MATCH if this object is exactly of the type expected by the receiver - WEAKLY_ASSIGNABLE if this object is not exactly the expected type but is assignable nonetheless - NOT_ASSIGNABLE if it's not assignable Most caller should just call the isAssignable() method on the result, though functions have a use for testing "strong" equality to decide the most precise overload to pick when multiple could match.
-
newSelectorFactory
public Selector.Factory newSelectorFactory(TableMetadata cfm, AbstractType<?> expectedType, java.util.List<ColumnMetadata> defs, VariableSpecifications boundNames)
- Specified by:
newSelectorFactory
in interfaceSelectable
- Overrides:
newSelectorFactory
in classSelectable.WithArrayLiteral
-
getExactTypeIfKnown
public AbstractType<?> getExactTypeIfKnown(java.lang.String keyspace)
Description copied from interface:Selectable
The type of theSelectable
if it can be infered.- Specified by:
getExactTypeIfKnown
in interfaceSelectable
- Overrides:
getExactTypeIfKnown
in classSelectable.WithArrayLiteral
- Parameters:
keyspace
- the keyspace on which the statement for which this is aSelectable
is on.- Returns:
- the type of this
Selectable
if inferrable, ornull
otherwise (for instance, the type isn't inferable for a bind marker. Even for literals, the exact type is not inferrable since they are valid for many different types and so this will returnnull
too).
-
getCompatibleTypeIfKnown
public AbstractType<?> getCompatibleTypeIfKnown(java.lang.String keyspace)
- Specified by:
getCompatibleTypeIfKnown
in interfaceAssignmentTestable
- Specified by:
getCompatibleTypeIfKnown
in interfaceSelectable
- Overrides:
getCompatibleTypeIfKnown
in classSelectable.WithArrayLiteral
- Returns:
- A data type that can represent this, or
null
if we can't determine that type. The returned type won't necessarely be the exact type, but one that is compatible with it.
-
selectColumns
public boolean selectColumns(java.util.function.Predicate<ColumnMetadata> predicate)
Description copied from interface:Selectable
Checks if thisSelectable
select columns matching the specified predicate.- Specified by:
selectColumns
in interfaceSelectable
- Overrides:
selectColumns
in classSelectable.WithArrayLiteral
- Returns:
true
if thisSelectable
select columns matching the specified predicate,false
otherwise.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classSelectable.WithArrayLiteral
-
-