vortex_layout

Trait LayoutEncoding

Source
pub trait LayoutEncoding:
    Debug
    + Send
    + Sync {
    // Required methods
    fn id(&self) -> LayoutId;
    fn reader(
        &self,
        layout: LayoutData,
        ctx: ContextRef,
        segments: Arc<dyn AsyncSegmentReader>,
    ) -> VortexResult<Arc<dyn LayoutReader>>;
    fn register_splits(
        &self,
        layout: &LayoutData,
        field_mask: &[FieldMask],
        row_offset: u64,
        splits: &mut BTreeSet<u64>,
    ) -> VortexResult<()>;
}

Required Methods§

Source

fn id(&self) -> LayoutId

Returns the globally unique ID for this type of layout.

Source

fn reader( &self, layout: LayoutData, ctx: ContextRef, segments: Arc<dyn AsyncSegmentReader>, ) -> VortexResult<Arc<dyn LayoutReader>>

Construct a LayoutReader for the provided LayoutData.

May panic if the provided LayoutData is not the same encoding as this LayoutEncoding.

Source

fn register_splits( &self, layout: &LayoutData, field_mask: &[FieldMask], row_offset: u64, splits: &mut BTreeSet<u64>, ) -> VortexResult<()>

Register the row splits for this layout, these represent natural boundaries at which a reader can split the layout for independent processing.

For example, a ChunkedLayout would register a boundary at the end of every chunk.

The layout is passed a row_offset that identifies the starting row of the layout within the file.

Implementors§

Source§

impl LayoutEncoding for ChunkedLayout

In-memory representation of Chunked layout.

First child in the list is the metadata table Subsequent children are consecutive chunks of this layout

Source§

impl LayoutEncoding for FlatLayout

Source§

impl LayoutEncoding for StructLayout