pub trait Vector:
Send
+ Sync
+ Serializable
+ Debug
+ VectorOp {
Show 17 methods
// Required methods
fn data_type(&self) -> ConcreteDataType;
fn vector_type_name(&self) -> String;
fn as_any(&self) -> &dyn Any;
fn len(&self) -> usize;
fn to_arrow_array(&self) -> ArrayRef;
fn to_boxed_arrow_array(&self) -> Box<dyn Array>;
fn validity(&self) -> Validity;
fn memory_size(&self) -> usize;
fn null_count(&self) -> usize;
fn is_null(&self, row: usize) -> bool;
fn slice(&self, offset: usize, length: usize) -> VectorRef;
fn get(&self, index: usize) -> Value;
fn get_ref(&self, index: usize) -> ValueRef<'_>;
// Provided methods
fn is_empty(&self) -> bool { ... }
fn is_const(&self) -> bool { ... }
fn only_null(&self) -> bool { ... }
fn try_get(&self, index: usize) -> Result<Value> { ... }
}
Expand description
Vector of data values.
Required Methods§
Sourcefn data_type(&self) -> ConcreteDataType
fn data_type(&self) -> ConcreteDataType
Returns the data type of the vector.
This may require heap allocation.
fn vector_type_name(&self) -> String
Sourcefn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Returns the vector as Any so that it can be downcast to a specific implementation.
Sourcefn to_arrow_array(&self) -> ArrayRef
fn to_arrow_array(&self) -> ArrayRef
Convert this vector to a new arrow [ArrayRef].
Sourcefn to_boxed_arrow_array(&self) -> Box<dyn Array>
fn to_boxed_arrow_array(&self) -> Box<dyn Array>
Convert this vector to a new boxed arrow [Array].
Sourcefn memory_size(&self) -> usize
fn memory_size(&self) -> usize
Returns the memory size of vector.
Sourcefn null_count(&self) -> usize
fn null_count(&self) -> usize
Sourcefn slice(&self, offset: usize, length: usize) -> VectorRef
fn slice(&self, offset: usize, length: usize) -> VectorRef
Slices the Vector
, returning a new VectorRef
.
§Panics
This function panics if offset + length > self.len()
.