Struct mz_compute_client::plan::reduce::BucketedPlan
source · pub struct BucketedPlan {
pub aggr_funcs: Vec<AggregateFunc>,
pub skips: Vec<usize>,
pub buckets: Vec<u64>,
}
Expand description
Plan for computing a set of hierarchical aggregations with non-monotonic inputs.
To perform hierarchical aggregations with stable runtimes under updates we’ll subdivide the group key into buckets, compute the reduction in each of those subdivided buckets and then combine the results into a coarser bucket (one that represents a larger fraction of the original input) and redo the reduction in another layer. Effectively, we’ll construct a min / max heap out of a series of reduce operators (each one is a separate layer).
Fields§
§aggr_funcs: Vec<AggregateFunc>
All of the aggregations we were asked to compute.
skips: Vec<usize>
Set of “skips” or calls to nth()
an iterator needs to do over
the input to extract the relevant datums.
buckets: Vec<u64>
The number of buckets in each layer of the reduction tree. Should
be decreasing, and ideally, a power of two so that we can easily
distribute values to buckets with value.hashed() % buckets[layer]
.
Implementations§
source§impl BucketedPlan
impl BucketedPlan
sourcefn into_monotonic(self, must_consolidate: bool) -> MonotonicPlan
fn into_monotonic(self, must_consolidate: bool) -> MonotonicPlan
Convert to a monotonic plan, indicate whether the operator must apply consolidation to its input.
Trait Implementations§
source§impl Clone for BucketedPlan
impl Clone for BucketedPlan
source§fn clone(&self) -> BucketedPlan
fn clone(&self) -> BucketedPlan
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BucketedPlan
impl Debug for BucketedPlan
source§impl<'de> Deserialize<'de> for BucketedPlan
impl<'de> Deserialize<'de> for BucketedPlan
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>,
source§impl PartialEq<BucketedPlan> for BucketedPlan
impl PartialEq<BucketedPlan> for BucketedPlan
source§fn eq(&self, other: &BucketedPlan) -> bool
fn eq(&self, other: &BucketedPlan) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl RustType<ProtoBucketedPlan> for BucketedPlan
impl RustType<ProtoBucketedPlan> for BucketedPlan
source§fn into_proto(&self) -> ProtoBucketedPlan
fn into_proto(&self) -> ProtoBucketedPlan
Self
into a Proto
value.source§fn from_proto(proto: ProtoBucketedPlan) -> Result<Self, TryFromProtoError>
fn from_proto(proto: ProtoBucketedPlan) -> Result<Self, TryFromProtoError>
source§impl Serialize for BucketedPlan
impl Serialize for BucketedPlan
impl Eq for BucketedPlan
impl StructuralEq for BucketedPlan
impl StructuralPartialEq for BucketedPlan
Auto Trait Implementations§
impl RefUnwindSafe for BucketedPlan
impl Send for BucketedPlan
impl Sync for BucketedPlan
impl Unpin for BucketedPlan
impl UnwindSafe for BucketedPlan
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.