Struct lance_table::format::DataFile
source · pub struct DataFile {
pub path: String,
pub fields: Vec<i32>,
pub column_indices: Vec<i32>,
pub file_major_version: u32,
pub file_minor_version: u32,
}Expand description
Lance Data File
A data file is one piece of file storing data.
Fields§
§path: StringRelative path of the data file to dataset root.
fields: Vec<i32>The ids of fields in this file.
column_indices: Vec<i32>The offsets of the fields listed in fields, empty in v1 files
Note that -1 is a possibility and it indices that the field has no top-level column in the file.
file_major_version: u32The major version of the file format used to write this file.
file_minor_version: u32The minor version of the file format used to write this file.
Implementations§
source§impl DataFile
impl DataFile
pub fn new( path: impl Into<String>, fields: Vec<i32>, column_indices: Vec<i32>, file_major_version: u32, file_minor_version: u32, ) -> Self
pub fn new_legacy_from_fields(path: impl Into<String>, fields: Vec<i32>) -> Self
pub fn new_legacy(path: impl Into<String>, schema: &Schema) -> Self
pub fn schema(&self, full_schema: &Schema) -> Schema
pub fn is_legacy_file(&self) -> bool
pub fn validate(&self, base_path: &Path) -> Result<()>
Trait Implementations§
source§impl<'de> Deserialize<'de> for DataFile
impl<'de> Deserialize<'de> for DataFile
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for DataFile
impl PartialEq for DataFile
impl Eq for DataFile
impl StructuralPartialEq for DataFile
Auto Trait Implementations§
impl Freeze for DataFile
impl RefUnwindSafe for DataFile
impl Send for DataFile
impl Sync for DataFile
impl Unpin for DataFile
impl UnwindSafe for DataFile
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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