Struct mz_compute::compute_state::PendingPeek
source · pub struct PendingPeek {
peek: Peek,
trace_bundle: TraceBundle,
span: Span,
}
Expand description
An in-progress peek, and data to eventually fulfill it.
Note that PendingPeek
intentionally does not implement or derive Clone
,
as each PendingPeek
is meant to be dropped after it’s responded to.
Fields§
§peek: Peek
§trace_bundle: TraceBundle
The data from which the trace derives.
span: Span
The tracing::Span
tracking this peek’s operation
Implementations§
source§impl PendingPeek
impl PendingPeek
sourcepub fn as_log_event(&self) -> Peek
pub fn as_log_event(&self) -> Peek
Produces a corresponding log event.
sourcefn seek_fulfillment(
&mut self,
upper: &mut Antichain<Timestamp>,
max_result_size: u32
) -> Option<PeekResponse>
fn seek_fulfillment( &mut self, upper: &mut Antichain<Timestamp>, max_result_size: u32 ) -> Option<PeekResponse>
Attempts to fulfill the peek and reports success.
To produce output at peek.timestamp
, we must be certain that
it is no longer changing. A trace guarantees that all future
changes will be greater than or equal to an element of upper
.
If an element of upper
is less or equal to peek.timestamp
,
then there can be further updates that would change the output.
If no element of upper
is less or equal to peek.timestamp
,
then for any time t
less or equal to peek.timestamp
it is
not the case that upper
is less or equal to that timestamp,
and so the result cannot further evolve.
sourcefn collect_finished_data(
&mut self,
max_result_size: u32
) -> Result<Vec<(Row, NonZeroUsize)>, String>
fn collect_finished_data( &mut self, max_result_size: u32 ) -> Result<Vec<(Row, NonZeroUsize)>, String>
Collects data for a known-complete peek from the ok stream.
sourcefn dispatch_collect_ok_finished_data(
&mut self,
max_result_size: u32
) -> Result<Vec<(Row, NonZeroUsize)>, String>
fn dispatch_collect_ok_finished_data( &mut self, max_result_size: u32 ) -> Result<Vec<(Row, NonZeroUsize)>, String>
Dispatches peek finishing of data in the ok stream according to arrangement key-value types.
sourcefn collect_ok_finished_data<Tr, K, V>(
peek: &mut Peek<Timestamp>,
oks_handle: &mut TraceAgent<Tr>,
key_types: Option<&[ColumnType]>,
val_types: Option<&[ColumnType]>,
max_result_size: u32
) -> Result<Vec<(Row, NonZeroUsize)>, String>where
Tr: TraceReader<Key = K, Val = V, Time = Timestamp, R = Diff>,
Tr::Key: Columnation + Data + FromRowByTypes + IntoRowByTypes,
Tr::Val: Columnation + Data + IntoRowByTypes,
fn collect_ok_finished_data<Tr, K, V>( peek: &mut Peek<Timestamp>, oks_handle: &mut TraceAgent<Tr>, key_types: Option<&[ColumnType]>, val_types: Option<&[ColumnType]>, max_result_size: u32 ) -> Result<Vec<(Row, NonZeroUsize)>, String>where Tr: TraceReader<Key = K, Val = V, Time = Timestamp, R = Diff>, Tr::Key: Columnation + Data + FromRowByTypes + IntoRowByTypes, Tr::Val: Columnation + Data + IntoRowByTypes,
Collects data for a known-complete peek from the ok stream.
Auto Trait Implementations§
impl !RefUnwindSafe for PendingPeek
impl !Send for PendingPeek
impl !Sync for PendingPeek
impl Unpin for PendingPeek
impl !UnwindSafe for PendingPeek
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> 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
.