Struct lance_file::v2::reader::ReaderProjection
source · pub struct ReaderProjection {
pub schema: Arc<Schema>,
pub column_indices: Vec<u32>,
}
Expand description
Selecting columns from a lance file requires specifying both the index of the column and the data type of the column
Partly, this is because it is not strictly required that columns be read into the same type. For example, a string column may be read as a string, large_string or string_view type.
A read will only succeed if the decoder for a column is capable of decoding into the requested type.
Note that this should generally be limited to different in-memory representations of the same semantic type. An encoding could theoretically support “casting” (e.g. int to string, etc.) but there is little advantage in doing so here.
Fields§
§schema: Arc<Schema>
The data types (schema) of the selected columns. The names of the schema are arbitrary and ignored.
column_indices: Vec<u32>
The indices of the columns to load. Note, these are the indices of the top level fields only
Trait Implementations§
source§impl Clone for ReaderProjection
impl Clone for ReaderProjection
source§fn clone(&self) -> ReaderProjection
fn clone(&self) -> ReaderProjection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for ReaderProjection
impl !RefUnwindSafe for ReaderProjection
impl Send for ReaderProjection
impl Sync for ReaderProjection
impl Unpin for ReaderProjection
impl !UnwindSafe for ReaderProjection
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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>
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>
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