Skip to main content

VectorOp

Trait VectorOp 

Source
pub trait VectorOp {
    // Required methods
    fn filter(&self, filter: &BooleanVector) -> Result<VectorRef>;
    fn cast(&self, to_type: &ConcreteDataType) -> Result<VectorRef>;
    fn take(&self, indices: &UInt32Vector) -> Result<VectorRef>;
}
Expand description

Vector compute operations.

Required Methods§

Source

fn filter(&self, filter: &BooleanVector) -> Result<VectorRef>

Filters the vector, returns elements matching the filter (i.e. where the values are true).

Note that the nulls of filter are interpreted as false will lead to these elements being masked out.

Source

fn cast(&self, to_type: &ConcreteDataType) -> Result<VectorRef>

Cast vector to the provided data type and return a new vector with type to_type, if possible.

TODO(dennis) describe behaviors in details.

Source

fn take(&self, indices: &UInt32Vector) -> Result<VectorRef>

Take elements from the vector by the given indices.

§Panics

Panics if an index is out of bounds.

Implementors§