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: String
Relative 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: u32
The major version of the file format used to write this file.
file_minor_version: u32
The 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
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>) -> 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 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
Returns an estimation of the heap-managed storage of this object.
This does not include the size of the object itself. Read more
Source§fn deep_size_of(&self) -> usize
fn deep_size_of(&self) -> usize
Returns an estimation of a total size of memory owned by the
object, including heap-managed storage. Read more
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
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<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>
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.