pub trait Layout:
'static
+ Send
+ Sync
+ Debug
+ Sealed {
Show 13 methods
// Required methods
fn as_any(&self) -> &dyn Any;
fn as_any_arc(self: Arc<Self>) -> Arc<dyn Any + Send + Sync>;
fn to_layout(&self) -> LayoutRef;
fn encoding(&self) -> LayoutEncodingRef;
fn row_count(&self) -> u64;
fn dtype(&self) -> &DType;
fn nchildren(&self) -> usize;
fn child(&self, idx: usize) -> VortexResult<LayoutRef>;
fn child_type(&self, idx: usize) -> LayoutChildType;
fn metadata(&self) -> Vec<u8> ⓘ;
fn segment_ids(&self) -> Vec<SegmentId>;
fn register_splits(
&self,
field_mask: &[FieldMask],
row_offset: u64,
splits: &mut BTreeSet<u64>,
) -> VortexResult<()>;
fn new_reader(
&self,
name: &Arc<str>,
segment_source: &Arc<dyn SegmentSource>,
ctx: &ArrayContext,
) -> VortexResult<LayoutReaderRef>;
}
Required Methods§
fn as_any(&self) -> &dyn Any
fn as_any_arc(self: Arc<Self>) -> Arc<dyn Any + Send + Sync>
fn to_layout(&self) -> LayoutRef
Sourcefn encoding(&self) -> LayoutEncodingRef
fn encoding(&self) -> LayoutEncodingRef
Returns the crate::LayoutEncoding
for this layout.
Sourcefn child(&self, idx: usize) -> VortexResult<LayoutRef>
fn child(&self, idx: usize) -> VortexResult<LayoutRef>
Get the child at the given index.
Sourcefn child_type(&self, idx: usize) -> LayoutChildType
fn child_type(&self, idx: usize) -> LayoutChildType
Get the relative row offset of the child at the given index, returning None
for
any auxilliary children, e.g. dictionary values, zone maps, etc.
Sourcefn segment_ids(&self) -> Vec<SegmentId>
fn segment_ids(&self) -> Vec<SegmentId>
Get the segment IDs for this layout.
fn register_splits( &self, field_mask: &[FieldMask], row_offset: u64, splits: &mut BTreeSet<u64>, ) -> VortexResult<()>
fn new_reader( &self, name: &Arc<str>, segment_source: &Arc<dyn SegmentSource>, ctx: &ArrayContext, ) -> VortexResult<LayoutReaderRef>
Implementations§
Source§impl dyn Layout + '_
impl dyn Layout + '_
Sourcepub fn flatbuffer_writer<'a>(
&'a self,
ctx: &'a LayoutContext,
) -> impl WriteFlatBuffer<Target<'a> = Layout<'a>> + FlatBufferRoot + 'a
pub fn flatbuffer_writer<'a>( &'a self, ctx: &'a LayoutContext, ) -> impl WriteFlatBuffer<Target<'a> = Layout<'a>> + FlatBufferRoot + 'a
Serialize the layout into a FlatBufferBuilder
.
Source§impl dyn Layout + '_
impl dyn Layout + '_
Sourcepub fn encoding_id(&self) -> LayoutEncodingId
pub fn encoding_id(&self) -> LayoutEncodingId
The ID of the encoding for this layout.
Sourcepub fn children(&self) -> VortexResult<Vec<LayoutRef>>
pub fn children(&self) -> VortexResult<Vec<LayoutRef>>
The children of this layout.
Sourcepub fn child_types(&self) -> impl Iterator<Item = LayoutChildType>
pub fn child_types(&self) -> impl Iterator<Item = LayoutChildType>
The child types of this layout.
Sourcepub fn child_names(&self) -> impl Iterator<Item = Arc<str>>
pub fn child_names(&self) -> impl Iterator<Item = Arc<str>>
The names of the children of this layout.
Sourcepub fn child_row_offsets(&self) -> impl Iterator<Item = Option<u64>>
pub fn child_row_offsets(&self) -> impl Iterator<Item = Option<u64>>
The row offsets of the children of this layout, where None
indicates an auxilliary child.
pub fn is<V: VTable>(&self) -> bool
Sourcepub fn into<V: VTable>(self: Arc<Self>) -> Arc<V::Layout>
pub fn into<V: VTable>(self: Arc<Self>) -> Arc<V::Layout>
Downcast a layout to a specific type.
Sourcepub fn depth_first_traversal(
&self,
) -> impl Iterator<Item = VortexResult<LayoutRef>>
pub fn depth_first_traversal( &self, ) -> impl Iterator<Item = VortexResult<LayoutRef>>
Depth-first traversal of the layout and its children.