pub struct DataFilePart { /* private fields */ }Expand description
A complete ordinary Lance file validated for data-file concatenation.
A part is independently readable and is not an incomplete file-format
fragment or a persisted Manifest entity. Opening one reads its real footer,
verifies that its physical columns form a complete rectangular file, and
checks Blob v2 descriptors against the caller-provided ID lease. Parts with
Blob v2 columns are also bound to the caller-provided BlobTargetId.
This runtime value has no fragment, source-row, range, dataset, or storage
identity. Lance defines no serialization or recovery contract for it. The
caller owns the input storage and must keep every Blob-bearing part associated
with the dataset and base where its managed payloads were written. The order
passed to concat_data_file_parts determines final physical row order.
§Example
use lance_file::concat::{DataFilePart, EncodedFileInput};
use lance_io::scheduler::FileScheduler;
let part = DataFilePart::open(EncodedFileInput::new(file), None, None).await?;
println!("part rows: {}", part.num_rows());Implementations§
Source§impl DataFilePart
impl DataFilePart
Sourcepub async fn open(
input: EncodedFileInput,
blob_ids: Option<Range<u32>>,
blob_target_id: Option<BlobTargetId>,
) -> Result<Self>
pub async fn open( input: EncodedFileInput, blob_ids: Option<Range<u32>>, blob_target_id: Option<BlobTargetId>, ) -> Result<Self>
Open and validate one complete encoded file.
blob_ids is the half-open ID range leased to this part. Managed
Packed and Dedicated descriptors must fall inside it. blob_target_id
associates the part with one final target for runtime equality checks and
is required whenever the part contains Blob v2 columns. It does not prove
that the target belongs to a particular dataset or storage namespace.
Non-empty Inline Blob v2 descriptors and legacy Blob v1 columns are
rejected because their payload locations cannot be reused in a different
data file.
Trait Implementations§
Source§impl Clone for DataFilePart
impl Clone for DataFilePart
Source§fn clone(&self) -> DataFilePart
fn clone(&self) -> DataFilePart
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DataFilePart
impl !UnwindSafe for DataFilePart
impl Freeze for DataFilePart
impl Send for DataFilePart
impl Sync for DataFilePart
impl Unpin for DataFilePart
impl UnsafeUnpin for DataFilePart
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
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> ⓘ
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