Skip to main content

PbMatchRecognizeNode

Type Alias PbMatchRecognizeNode 

Source
pub type PbMatchRecognizeNode = MatchRecognizeNode;

Aliased Type§

pub struct PbMatchRecognizeNode {
    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,
}

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: i32

How 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.