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,
pub file_size_bytes: CachedFileSize,
pub base_id: Option<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.
Columns that lack a field id may still exist as extra entries in
column_indices; such columns are ignored by field-id–based projection.
For example, some fields, such as blob fields, occupy multiple
columns in the file but only have a single field id.
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.
file_size_bytes: CachedFileSizeThe size of the file in bytes, if known.
base_id: Option<u32>The base path of the datafile, when the datafile is outside the dataset.
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, file_size_bytes: Option<NonZero<u64>>, base_id: Option<u32>, ) -> Self
Sourcepub fn new_unstarted(
path: impl Into<String>,
file_major_version: u32,
file_minor_version: u32,
) -> Self
pub fn new_unstarted( path: impl Into<String>, file_major_version: u32, file_minor_version: u32, ) -> Self
Create a new DataFile with the expectation that fields and column_indices will be set later
pub fn new_legacy_from_fields( path: impl Into<String>, fields: Vec<i32>, base_id: Option<u32>, ) -> Self
pub fn new_legacy( path: impl Into<String>, schema: &Schema, file_size_bytes: Option<NonZero<u64>>, base_id: Option<u32>, ) -> 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 DeepSizeOf for DataFile
impl DeepSizeOf for DataFile
Source§fn deep_size_of_children(&self, context: &mut Context) -> usize
fn deep_size_of_children(&self, context: &mut Context) -> usize
Source§fn deep_size_of(&self) -> usize
fn deep_size_of(&self) -> usize
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>,
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)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
key and return true if they are equal.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§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