Struct vortex_file::VortexReadBuilder
source · pub struct VortexReadBuilder<R> { /* private fields */ }
Expand description
Builder for reading Vortex files.
Succinctly, the file format specification is as follows:
- Data is written first, in a form that is describable by a Layout (typically Array IPC Messages). a. To allow for more efficient IO & pruning, our writer implementation first writes the “data” arrays, and then writes the “metadata” arrays (i.e., per-column statistics)
- We write what is collectively referred to as the “Footer”, which contains: a. An optional Schema, which if present is a valid flatbuffer representing a message::Schema b. The Layout, which is a valid footer::Layout flatbuffer, and describes the physical byte ranges & relationships amongst the those byte ranges that we wrote in part 1. c. The Postscript, which is a valid footer::Postscript flatbuffer, containing the absolute start offsets of the Schema & Layout flatbuffers within the file. d. The End-of-File marker, which is 8 bytes, and contains the u16 version, u16 postscript length, and 4 magic bytes.
§Reified File Format
┌────────────────────────────┐
│ │
│ Data │
│ (Array IPC Messages) │
│ │
├────────────────────────────┤
│ │
│ Per-Column Statistics │
│ │
├────────────────────────────┤
│ │
│ Schema Flatbuffer │
│ │
├────────────────────────────┤
│ │
│ Layout Flatbuffer │
│ │
├────────────────────────────┤
│ │
│ Postscript Flatbuffer │
│ (Schema & Layout Offsets) │
│ │
├────────────────────────────┤
│ 8-byte End of File │
│(Version, Postscript Length,│
│ Magic Bytes) │
└────────────────────────────┘
Implementations§
source§impl<R: VortexReadAt + Unpin> VortexReadBuilder<R>
impl<R: VortexReadAt + Unpin> VortexReadBuilder<R>
pub fn new(read_at: R, layout_serde: LayoutDeserializer) -> Self
pub fn with_file_size(self, size: u64) -> Self
pub fn with_projection(self, projection: Projection) -> Self
pub fn with_indices(self, array: ArrayData) -> Self
pub fn with_row_filter(self, row_filter: RowFilter) -> Self
pub fn with_io_dispatcher(self, dispatcher: Arc<IoDispatcher>) -> Self
pub fn with_initial_read(self, initial_read: InitialRead) -> Self
pub async fn build(self) -> VortexResult<VortexFileArrayStream<R>>
Auto Trait Implementations§
impl<R> !Freeze for VortexReadBuilder<R>
impl<R> !RefUnwindSafe for VortexReadBuilder<R>
impl<R> Send for VortexReadBuilder<R>where
R: Send,
impl<R> Sync for VortexReadBuilder<R>where
R: Sync,
impl<R> Unpin for VortexReadBuilder<R>where
R: Unpin,
impl<R> !UnwindSafe for VortexReadBuilder<R>
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
§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>
Converts
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>
Converts
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