pub struct StreamingDataset { /* private fields */ }Expand description
Streaming dataset with lazy chunk loading
Uses file seeking to load chunks on demand, minimizing memory usage.
Implementations§
Source§impl StreamingDataset
impl StreamingDataset
Sourcepub fn open(path: impl AsRef<Path>) -> Result<Self>
pub fn open(path: impl AsRef<Path>) -> Result<Self>
Open a streaming dataset from a file
Only reads the header, metadata, and chunk index initially. Chunks are loaded on demand.
§Errors
Returns error if file cannot be opened, is not a valid .ald file, or does not have the STREAMING flag set.
Sourcepub fn num_chunks(&self) -> usize
pub fn num_chunks(&self) -> usize
Get number of chunks
Sourcepub fn get_chunk(&self, chunk_idx: usize) -> Result<RecordBatch>
pub fn get_chunk(&self, chunk_idx: usize) -> Result<RecordBatch>
Load a specific chunk by index
§Errors
Returns error if chunk index is out of bounds or decompression fails.
Sourcepub fn chunks(&self) -> ChunkIterator<'_> ⓘ
pub fn chunks(&self) -> ChunkIterator<'_> ⓘ
Iterate over all chunks
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamingDataset
impl RefUnwindSafe for StreamingDataset
impl Send for StreamingDataset
impl Sync for StreamingDataset
impl Unpin for StreamingDataset
impl UnsafeUnpin for StreamingDataset
impl UnwindSafe for StreamingDataset
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreCreates a shared type from an unshared type.