pub struct SorbetColumnDescriptors {
pub row_id: Option<RowIdColumnDescriptor>,
pub indices: Vec<IndexColumnDescriptor>,
pub components: Vec<ComponentColumnDescriptor>,
}
Fields§
§row_id: Option<RowIdColumnDescriptor>
The primary row id column. If present, it is always the first column.
indices: Vec<IndexColumnDescriptor>
Index columns (timelines).
components: Vec<ComponentColumnDescriptor>
The actual component data
Implementations§
Source§impl SorbetColumnDescriptors
impl SorbetColumnDescriptors
Sourcepub fn sanity_check(&self)
pub fn sanity_check(&self)
Debug-only sanity check.
Sourcepub fn num_columns(&self) -> usize
pub fn num_columns(&self) -> usize
Total number of columns in this chunk, including the row id column, the index columns, and the data columns.
Sourcepub fn entity_paths(&self) -> IntSet<EntityPath>
pub fn entity_paths(&self) -> IntSet<EntityPath>
All unique entity paths present in the view contents.
Sourcepub fn descriptors(&self) -> impl Iterator<Item = ColumnDescriptorRef<'_>> + '_
pub fn descriptors(&self) -> impl Iterator<Item = ColumnDescriptorRef<'_>> + '_
Returns all columns, including the row_id
column.
See also Self::indices_and_components
.
Sourcepub fn indices_and_components(&self) -> Vec<ColumnDescriptor>
pub fn indices_and_components(&self) -> Vec<ColumnDescriptor>
Returns all indices and then all components;
skipping the row_id
column.
See also Self::get_index_or_component
.
Sourcepub fn get_index_or_component(
&self,
index_ignoring_row_id: usize,
) -> Option<ColumnDescriptor>
pub fn get_index_or_component( &self, index_ignoring_row_id: usize, ) -> Option<ColumnDescriptor>
Index the index- and component columns, ignoring the row_id
column completely.
That is, get_index_or_component(0)
will return the first index column (if any; otherwise
the first component column).
See also Self::indices_and_components
.
pub fn arrow_fields(&self, batch_type: BatchType) -> Vec<ArrowField>
Sourcepub fn filter_components(
self,
keep: impl Fn(&ComponentColumnDescriptor) -> bool,
) -> Self
pub fn filter_components( self, keep: impl Fn(&ComponentColumnDescriptor) -> bool, ) -> Self
Keep only the component columns that satisfy the given predicate.
Source§impl SorbetColumnDescriptors
impl SorbetColumnDescriptors
pub fn try_from_arrow_fields( chunk_entity_path: Option<&EntityPath>, fields: &ArrowFields, ) -> Result<Self, SorbetError>
Trait Implementations§
Source§impl Clone for SorbetColumnDescriptors
impl Clone for SorbetColumnDescriptors
Source§fn clone(&self) -> SorbetColumnDescriptors
fn clone(&self) -> SorbetColumnDescriptors
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SorbetColumnDescriptors
impl Debug for SorbetColumnDescriptors
Source§impl From<SorbetSchema> for SorbetColumnDescriptors
impl From<SorbetSchema> for SorbetColumnDescriptors
Source§fn from(sorbet_schema: SorbetSchema) -> Self
fn from(sorbet_schema: SorbetSchema) -> Self
Source§impl PartialEq for SorbetColumnDescriptors
impl PartialEq for SorbetColumnDescriptors
impl Eq for SorbetColumnDescriptors
impl StructuralPartialEq for SorbetColumnDescriptors
Auto Trait Implementations§
impl Freeze for SorbetColumnDescriptors
impl RefUnwindSafe for SorbetColumnDescriptors
impl Send for SorbetColumnDescriptors
impl Sync for SorbetColumnDescriptors
impl Unpin for SorbetColumnDescriptors
impl UnwindSafe for SorbetColumnDescriptors
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more