pub struct Column<T = u64> {
pub index: ColumnIndex,
pub values: Arc<dyn ColumnValues<T>>,
}
Fields§
§index: ColumnIndex
§values: Arc<dyn ColumnValues<T>>
Implementations§
source§impl<T> Column<T>where
T: PartialOrd + Default,
impl<T> Column<T>where
T: PartialOrd + Default,
pub fn build_empty_column(num_docs: u32) -> Column<T>
source§impl<T> Column<T>where
T: MonotonicallyMappableToU64,
impl<T> Column<T>where
T: MonotonicallyMappableToU64,
pub fn to_u64_monotonic(self) -> Column
source§impl<T> Column<T>
impl<T> Column<T>
pub fn get_cardinality(&self) -> Cardinality
pub fn num_docs(&self) -> u32
pub fn min_value(&self) -> T
pub fn max_value(&self) -> T
pub fn first(&self, row_id: u32) -> Option<T>
sourcepub fn first_vals(&self, docids: &[u32], output: &mut [Option<T>])
pub fn first_vals(&self, docids: &[u32], output: &mut [Option<T>])
Load the first value for each docid in the provided slice.
sourcepub fn row_ids_for_docs(
&self,
doc_ids: &[u32],
doc_ids_out: &mut Vec<u32>,
row_ids: &mut Vec<u32>
)
pub fn row_ids_for_docs( &self, doc_ids: &[u32], doc_ids_out: &mut Vec<u32>, row_ids: &mut Vec<u32> )
Translates a block of docis to row_ids.
returns the row_ids and the matching docids on the same index e.g. DocId In: [0, 5, 6] DocId Out: [0, 0, 6, 6] RowId Out: [0, 1, 2, 3]
pub fn values_for_doc(&self, doc_id: u32) -> impl Iterator<Item = T>
sourcepub fn get_docids_for_value_range(
&self,
value_range: RangeInclusive<T>,
selected_docid_range: Range<u32>,
doc_ids: &mut Vec<u32>
)
pub fn get_docids_for_value_range( &self, value_range: RangeInclusive<T>, selected_docid_range: Range<u32>, doc_ids: &mut Vec<u32> )
Get the docids of values which are in the provided value range.
sourcepub fn fill_vals(&self, row_id: u32, output: &mut Vec<T>)
pub fn fill_vals(&self, row_id: u32, output: &mut Vec<T>)
Fills the output vector with the (possibly multiple values that are associated_with
row_id
.
This method clears the output
vector.
pub fn first_or_default_col(self, default_value: T) -> Arc<dyn ColumnValues<T>>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Column<T>
impl<T = u64> !RefUnwindSafe for Column<T>
impl<T> Send for Column<T>
impl<T> Sync for Column<T>
impl<T> Unpin for Column<T>
impl<T = u64> !UnwindSafe for Column<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.