pub struct Partition {
pub view_metadata: ViewMetadata,
pub insert_time_range: TimeRange,
pub event_time_range: Option<TimeRange>,
pub updated: DateTime<Utc>,
pub file_path: Option<String>,
pub file_size: i64,
pub source_data_hash: Vec<u8>,
pub num_rows: i64,
}Expand description
Partition metadata (without embedded file_metadata for performance) Use load_partition_metadata() to load metadata on-demand when needed
Fields§
§view_metadata: ViewMetadataMetadata about the view this partition belongs to.
insert_time_range: TimeRangeThe insert time range for this partition.
event_time_range: Option<TimeRange>The event time range for this partition. None for empty partitions.
updated: DateTime<Utc>The last time this partition was updated.
file_path: Option<String>The path to the Parquet file for this partition. None for empty partitions.
file_size: i64The size of the Parquet file in bytes. 0 for empty partitions.
source_data_hash: Vec<u8>A hash of the source data that generated this partition.
num_rows: i64The number of rows in this partition. 0 for empty partitions.
Implementations§
Source§impl Partition
impl Partition
Sourcepub fn min_event_time(&self) -> Option<DateTime<Utc>>
pub fn min_event_time(&self) -> Option<DateTime<Utc>>
Returns the min event time, if this partition has data.
Sourcepub fn max_event_time(&self) -> Option<DateTime<Utc>>
pub fn max_event_time(&self) -> Option<DateTime<Utc>>
Returns the max event time, if this partition has data.
Sourcepub fn begin_insert_time(&self) -> DateTime<Utc>
pub fn begin_insert_time(&self) -> DateTime<Utc>
Returns the beginning of the insert time range.
Sourcepub fn end_insert_time(&self) -> DateTime<Utc>
pub fn end_insert_time(&self) -> DateTime<Utc>
Returns the end of the insert time range.
Sourcepub fn validate(&self) -> Result<(), Error>
pub fn validate(&self) -> Result<(), Error>
Validates partition invariants. Returns error if partition is inconsistent.
Invariants:
- Non-empty partitions (num_rows > 0) MUST have both event_time_range and file_path
- Empty partitions (num_rows = 0) MUST NOT have event_time_range or file_path
- num_rows must not be negative
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Partition
impl RefUnwindSafe for Partition
impl Send for Partition
impl Sync for Partition
impl Unpin for Partition
impl UnwindSafe for Partition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].