pub struct MatchRecognizeNode {
pub partition_by: Vec<u32>,
pub order_by: Vec<ColumnOrder>,
pub measures: Vec<MatchRecognizeMeasure>,
pub defines: Vec<MatchRecognizeDefine>,
pub pattern_node: Option<MatchRecognizePatternNode>,
pub state_table: Option<Table>,
pub after_match_skip: Option<MatchRecognizeAfterMatchSkip>,
pub within: Option<ExprNode>,
pub within_deadline: Option<ExprNode>,
pub input_mode: i32,
}Expand description
SQL:2016 MATCH_RECOGNIZE (row pattern recognition). v1: append-only input, ONE ROW PER MATCH. PARTITION BY / ORDER BY are input column indices.
Fields§
§partition_by: Vec<u32>§order_by: Vec<ColumnOrder>ORDER BY keys, carried as ColumnOrder like every other ordered streaming node. v1 only supports the default ascending order (the binder rejects DESC / explicit NULLS); the executor asserts it.
measures: Vec<MatchRecognizeMeasure>§defines: Vec<MatchRecognizeDefine>§pattern_node: Option<MatchRecognizePatternNode>The PATTERN clause as a structured tree (the v1 subset: variables, concatenation, alternation, quantification and PERMUTE; anchors and exclusions are rejected at parse time). Field 7 previously carried the pattern as text; it is now reserved.
state_table: Option<Table>Rows referenced by live partial matches, keyed (partition…, order…, seq): the retained
window the matcher re-feeds on recovery. Input arrives already ordered (see input_mode), so
this holds only what live matches still need – there is no out-of-order buffer here.
after_match_skip: Option<MatchRecognizeAfterMatchSkip>AFTER MATCH SKIP strategy.
within: Option<ExprNode>WITHIN span check: a predicate over a synthetic \[last_order_key, first_order_key\] row
(InputRef(0) - InputRef(1) <= interval). Absent when there is no WITHIN clause.
within_deadline: Option<ExprNode>WITHIN deadline: first_order_key + interval over a synthetic \[first_order_key\] row
(InputRef(0) + interval). The watermark at which a partial starting at that row expires;
used to wake an idle partition to evict it. Absent when there is no WITHIN clause.
input_mode: i32How the ordered-input requirement is satisfied. EVENT_TIME: an EowcSort upstream (same fragment) emits rows in full ORDER BY order, strictly below each forwarded watermark. PROCESSING_TIME (not yet planned): rows are matched in observed arrival order.
Implementations§
Source§impl MatchRecognizeNode
impl MatchRecognizeNode
Sourcepub fn input_mode(&self) -> MatchRecognizeInputMode
pub fn input_mode(&self) -> MatchRecognizeInputMode
Returns the enum value of input_mode, or the default if the field is set to an invalid enum value.
Sourcepub fn set_input_mode(&mut self, value: MatchRecognizeInputMode)
pub fn set_input_mode(&mut self, value: MatchRecognizeInputMode)
Sets input_mode to the provided enum value.
Source§impl MatchRecognizeNode
impl MatchRecognizeNode
pub fn get_partition_by(&self) -> &Vec<u32>
pub fn get_order_by(&self) -> &Vec<ColumnOrder>
pub fn get_measures(&self) -> &Vec<MatchRecognizeMeasure>
pub fn get_defines(&self) -> &Vec<MatchRecognizeDefine>
pub fn get_pattern_node( &self, ) -> Result<&MatchRecognizePatternNode, PbFieldNotFound>
pub fn get_state_table(&self) -> Result<&Table, PbFieldNotFound>
pub fn get_after_match_skip( &self, ) -> Result<&MatchRecognizeAfterMatchSkip, PbFieldNotFound>
pub fn get_within(&self) -> Result<&ExprNode, PbFieldNotFound>
pub fn get_within_deadline(&self) -> Result<&ExprNode, PbFieldNotFound>
pub fn get_input_mode(&self) -> Result<MatchRecognizeInputMode, PbFieldNotFound>
Trait Implementations§
Source§impl Clone for MatchRecognizeNode
impl Clone for MatchRecognizeNode
Source§fn clone(&self) -> MatchRecognizeNode
fn clone(&self) -> MatchRecognizeNode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MatchRecognizeNode
impl Debug for MatchRecognizeNode
Source§impl Default for MatchRecognizeNode
impl Default for MatchRecognizeNode
Source§impl<'de> Deserialize<'de> for MatchRecognizeNode
impl<'de> Deserialize<'de> for MatchRecognizeNode
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 Message for MatchRecognizeNode
impl Message for MatchRecognizeNode
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for MatchRecognizeNode
impl PartialEq for MatchRecognizeNode
Source§fn eq(&self, other: &MatchRecognizeNode) -> bool
fn eq(&self, other: &MatchRecognizeNode) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for MatchRecognizeNode
impl Serialize for MatchRecognizeNode
impl StructuralPartialEq for MatchRecognizeNode
Auto Trait Implementations§
impl Freeze for MatchRecognizeNode
impl RefUnwindSafe for MatchRecognizeNode
impl Send for MatchRecognizeNode
impl Sync for MatchRecognizeNode
impl Unpin for MatchRecognizeNode
impl UnsafeUnpin for MatchRecognizeNode
impl UnwindSafe for MatchRecognizeNode
Blanket Implementations§
impl<T> Allocation for T
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
U: Sized,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
U: Sized,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§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].