pub struct PartitionCache {
pub partitions: Vec<Partition>,
/* private fields */
}Expand description
PartitionCache allows to query partitions based on the insert_time range
Fields§
§partitions: Vec<Partition>Implementations§
Source§impl PartitionCache
impl PartitionCache
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn fetch_overlapping_insert_range(
pool: &Pool<Postgres>,
insert_range: TimeRange,
) -> impl Future<Output = Result<PartitionCache, Error>>
pub fn fetch_overlapping_insert_range( pool: &Pool<Postgres>, insert_range: TimeRange, ) -> impl Future<Output = Result<PartitionCache, Error>>
fetches the partitions of all views matching the specified insert range
Sourcepub fn fetch_overlapping_insert_range_for_view(
pool: &Pool<Postgres>,
view_set_name: Arc<String>,
view_instance_id: Arc<String>,
insert_range: TimeRange,
) -> impl Future<Output = Result<PartitionCache, Error>>
pub fn fetch_overlapping_insert_range_for_view( pool: &Pool<Postgres>, view_set_name: Arc<String>, view_instance_id: Arc<String>, insert_range: TimeRange, ) -> impl Future<Output = Result<PartitionCache, Error>>
fetches the partitions of a single view instance matching the specified insert range
pub fn filter( &self, view_set_name: &str, view_instance_id: &str, file_schema_hash: &[u8], insert_range: TimeRange, ) -> PartitionCache
pub fn filter_insert_range(&self, insert_range: TimeRange) -> PartitionCache
pub fn filter_inside_range( &self, view_set_name: &str, view_instance_id: &str, insert_range: TimeRange, ) -> PartitionCache
Trait Implementations§
Source§impl Debug for PartitionCache
impl Debug for PartitionCache
Source§impl Display for PartitionCache
impl Display for PartitionCache
Source§impl QueryPartitionProvider for PartitionCache
impl QueryPartitionProvider for PartitionCache
Source§fn fetch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
view_set_name: &'life1 str,
view_instance_id: &'life2 str,
query_range: Option<TimeRange>,
file_schema_hash: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Partition>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PartitionCache: 'async_trait,
fn fetch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
view_set_name: &'life1 str,
view_instance_id: &'life2 str,
query_range: Option<TimeRange>,
file_schema_hash: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Partition>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PartitionCache: 'async_trait,
unlike LivePartitionProvider, the query_range is tested against the insertion time, not the event time
Auto Trait Implementations§
impl Freeze for PartitionCache
impl RefUnwindSafe for PartitionCache
impl Send for PartitionCache
impl Sync for PartitionCache
impl Unpin for PartitionCache
impl UnwindSafe for PartitionCache
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
§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>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
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>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.