pub struct ProjectedFileReader { /* private fields */ }Expand description
A projection-scoped reader for a current-format Lance file.
This reader fixes a base projection at construction time. All later reads
must stay within that projection, which lets the reader load only the column
metadata needed by the base projection when opening from a FileMetadataIndex.
It intentionally does not expose APIs that require synchronous access to full
file metadata.
Implementations§
Source§impl ProjectedFileReader
impl ProjectedFileReader
Sourcepub fn with_scheduler(&self, scheduler: Arc<dyn EncodingsIo>) -> Self
pub fn with_scheduler(&self, scheduler: Arc<dyn EncodingsIo>) -> Self
Returns a clone of this reader using a different scheduler.
Sourcepub fn file_statistics(&self) -> Option<FileStatistics>
pub fn file_statistics(&self) -> Option<FileStatistics>
Returns file statistics when this reader has full file metadata.
Sourcepub async fn read_global_buffer(&self, index: u32) -> Result<Bytes>
pub async fn read_global_buffer(&self, index: u32) -> Result<Bytes>
Reads a global buffer by index.
Source§impl ProjectedFileReader
impl ProjectedFileReader
pub async fn try_open( scheduler: FileScheduler, base_projection: Option<ReaderProjection>, decoder_plugins: Arc<DecoderPlugins>, cache: &LanceCache, options: FileReaderOptions, ) -> Result<Self>
pub async fn try_open_with_metadata_index( scheduler: Arc<dyn EncodingsIo>, path: Path, base_projection: Option<ReaderProjection>, decoder_plugins: Arc<DecoderPlugins>, metadata_index: Arc<FileMetadataIndex>, cache: &LanceCache, options: FileReaderOptions, ) -> Result<Self>
pub async fn try_open_with_file_metadata( scheduler: Arc<dyn EncodingsIo>, path: Path, base_projection: Option<ReaderProjection>, decoder_plugins: Arc<DecoderPlugins>, metadata: Arc<CachedFileMetadata>, cache: &LanceCache, options: FileReaderOptions, ) -> Result<Self>
pub fn version(&self) -> ConcreteFileVersion
pub async fn read_tasks( &self, params: ReadBatchParams, batch_size: u32, projection: Option<ReaderProjection>, filter: FilterExpression, ) -> Result<Pin<Box<dyn Stream<Item = ReadBatchTask> + Send>>>
Trait Implementations§
Source§impl Clone for ProjectedFileReader
impl Clone for ProjectedFileReader
Source§fn clone(&self) -> ProjectedFileReader
fn clone(&self) -> ProjectedFileReader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ProjectedFileReader
impl !UnwindSafe for ProjectedFileReader
impl Freeze for ProjectedFileReader
impl Send for ProjectedFileReader
impl Sync for ProjectedFileReader
impl Unpin for ProjectedFileReader
impl UnsafeUnpin for ProjectedFileReader
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more