Package org.apache.cassandra.cql3
Class Vectors
java.lang.Object
org.apache.cassandra.cql3.Vectors
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBasically similar to a Value, but with some non-pure function (that need to be evaluated at execution time) in it.static classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> VectorType<?>getExactVectorTypeIfKnown(List<T> items, Function<T, AbstractType<?>> mapper) Returns the exact VectorType from the items if it can be known.static <T> VectorType<?>getPreferredCompatibleType(List<T> items, Function<T, AbstractType<?>> mapper) testVectorAssignment(ColumnSpecification receiver, List<? extends AssignmentTestable> elements) Tests that the vector with the specified elements can be assigned to the specified column.
-
Method Details
-
testVectorAssignment
public static AssignmentTestable.TestResult testVectorAssignment(ColumnSpecification receiver, List<? extends AssignmentTestable> elements) Tests that the vector with the specified elements can be assigned to the specified column.- Parameters:
receiver- the receiving columnelements- the vector elements
-
getExactVectorTypeIfKnown
public static <T> VectorType<?> getExactVectorTypeIfKnown(List<T> items, Function<T, AbstractType<?>> mapper) Returns the exact VectorType from the items if it can be known.- Parameters:
items- the items mapped to the vector elementsmapper- the mapper used to retrieve the element types from the items- Returns:
- the exact VectorType from the items if it can be known or
null
-
getPreferredCompatibleType
public static <T> VectorType<?> getPreferredCompatibleType(List<T> items, Function<T, AbstractType<?>> mapper)
-