pub struct CachedFileMetadata {
pub meta: ObjectMeta,
pub schema_fingerprint: Arc<SchemaFingerprint>,
pub statistics: Arc<Statistics>,
pub ordering: Option<LexOrdering>,
}Expand description
Cached metadata for a file, including statistics and ordering.
This struct embeds the ObjectMeta used for cache validation,
the file_schema fingerprint, cached statistics, and ordering information.
Fields§
§meta: ObjectMetaFile metadata used for cache validation (size, last_modified).
schema_fingerprint: Arc<SchemaFingerprint>Fingerprint of the file_schema used to compute statistics.
statistics: Arc<Statistics>Cached statistics for the file, if available.
ordering: Option<LexOrdering>Cached ordering for the file.
Implementations§
Source§impl CachedFileMetadata
impl CachedFileMetadata
Sourcepub fn new(
meta: ObjectMeta,
schema_fingerprint: Arc<SchemaFingerprint>,
statistics: Arc<Statistics>,
ordering: Option<LexOrdering>,
) -> Self
pub fn new( meta: ObjectMeta, schema_fingerprint: Arc<SchemaFingerprint>, statistics: Arc<Statistics>, ordering: Option<LexOrdering>, ) -> Self
Create a new cached file metadata entry.
Sourcepub fn is_valid_for(
&self,
current_meta: &ObjectMeta,
current_schema_fingerprint: &Arc<SchemaFingerprint>,
) -> bool
pub fn is_valid_for( &self, current_meta: &ObjectMeta, current_schema_fingerprint: &Arc<SchemaFingerprint>, ) -> bool
Check if this cached entry is still valid for the given metadata.
Returns true if the file size, last modified time, and schema match.
Trait Implementations§
Source§impl CacheValue for CachedFileMetadata
impl CacheValue for CachedFileMetadata
Source§impl Clone for CachedFileMetadata
impl Clone for CachedFileMetadata
Source§fn clone(&self) -> CachedFileMetadata
fn clone(&self) -> CachedFileMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DFHeapSize for CachedFileMetadata
impl DFHeapSize for CachedFileMetadata
Source§impl Debug for CachedFileMetadata
impl Debug for CachedFileMetadata
impl Eq for CachedFileMetadata
Source§impl PartialEq for CachedFileMetadata
impl PartialEq for CachedFileMetadata
impl StructuralPartialEq for CachedFileMetadata
Auto Trait Implementations§
impl !RefUnwindSafe for CachedFileMetadata
impl !UnwindSafe for CachedFileMetadata
impl Freeze for CachedFileMetadata
impl Send for CachedFileMetadata
impl Sync for CachedFileMetadata
impl Unpin for CachedFileMetadata
impl UnsafeUnpin for CachedFileMetadata
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§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> 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