risingwavelabs/risingwave · error

unsupported MATCH_RECOGNIZE input mode: {other:?}

Error message

unsupported MATCH_RECOGNIZE input mode: {other:?}

What it means

The MATCH_RECOGNIZE v1 executor only supports event-time (or the explicit-unset default) input. Any other decoded `MatchRecognizeInputMode` variant is rejected with this error at executor build time, because the executor's pattern-matching semantics are defined only over event-time ordered input.

Source

Thrown at src/stream/src/from_proto/match_recognize.rs:64

        // This executor's entire correctness rests on the ordered-input contract the EVENT_TIME
        // plan (an EowcSort upstream in the same fragment) provides. A different input mode —
        // PROCESSING_TIME is reserved, unimplemented — must fail here, not silently run against
        // rows whose ordering guarantee does not hold.
        // An out-of-range wire value decodes as `Unspecified` through the accessor, which would
        // silently run an unknown future mode as event-time — the one contract this executor's
        // correctness rests on. Reject it like every other enum in this decode path; a raw 0
        // (genuinely unset) is accepted as event-time since this frontend always writes it.
        if node.input_mode != 0 && node.input_mode() == MatchRecognizeInputMode::Unspecified {
            return Err(
                anyhow::anyhow!("unknown MATCH_RECOGNIZE input mode: {}", node.input_mode).into(),
            );
        }
        match node.input_mode() {
            MatchRecognizeInputMode::Unspecified | MatchRecognizeInputMode::EventTime => {}
            other => {
                return Err(
                    anyhow::anyhow!("unsupported MATCH_RECOGNIZE input mode: {other:?}").into(),
                );
            }
        }

        let partition_key_indices = node.partition_by.iter().map(|&i| i as usize).collect();
        // ORDER BY is carried as `ColumnOrder`. v1 only supports the default ascending order (the
        // binder rejects anything else); assert it here too so a non-ascending plan fails fast
        // rather than being silently sorted ascending by the executor.
        let order_key_indices = node
            .order_by
            .iter()
            .map(|c| {
                let co = ColumnOrder::from_protobuf(c);
                if co.order_type != OrderType::ascending() {
                    return Err(anyhow::anyhow!(
                        "MATCH_RECOGNIZE only supports the default ascending ORDER BY, got {:?}",
                        co.order_type
                    )

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Use the default (event-time) input mode for MATCH_RECOGNIZE — do not override the input mode in the query/planner.
  2. Align frontend and compute node versions so both support the requested mode.
  3. Inspect the serialized plan's `input_mode` value and correct the planner that set it.
  4. If a new mode is needed, implement its handling in the executor before enabling it in the frontend.

Example fix

// before
let mode = MatchRecognizeInputMode::ProcessingTime; // unsupported
// after
let mode = MatchRecognizeInputMode::EventTime; // v1 supported mode
Defensive patterns

Strategy: validation

Validate before calling

// restrict modes at the source
let allowed = matches!(node.input_mode(), MatchRecognizeInputMode::Unspecified | MatchRecognizeInputMode::EventTime);
if !allowed { return Err(anyhow!("only event-time MATCH_RECOGNIZE is supported")); }

Type guard

fn is_event_time(m: MatchRecognizeInputMode) -> bool {
    matches!(m, MatchRecognizeInputMode::Unspecified | MatchRecognizeInputMode::EventTime)
}

Try / catch

match node.input_mode() { Unspecified | EventTime => {}, other => return Err(anyhow!("unsupported MATCH_RECOGNIZE input mode: {other:?}")) }

Prevention

When it happens

Trigger: `new_boxed_executor` matches `node.input_mode()` against `Unspecified | EventTime` and hits the `other` arm — a known-but-unsupported enum variant (e.g. a processing-time mode) present in the plan proto.

Common situations: A newer frontend emitting a mode the current compute build does not support; manual construction of MATCH_RECOGNIZE nodes in tests with a non-event-time mode; version skew between planner and stream engine.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/e058716fe70e5031. Report an issue: GitHub.