{"record":{"id":"e058716fe70e5031","repo":"risingwavelabs/risingwave","slug":"unsupported-match-recognize-input-mode-other","errorCode":null,"errorMessage":"unsupported MATCH_RECOGNIZE input mode: {other:?}","messagePattern":"unsupported MATCH_RECOGNIZE input mode: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/stream/src/from_proto/match_recognize.rs","lineNumber":64,"sourceCode":"\n        // This executor's entire correctness rests on the ordered-input contract the EVENT_TIME\n        // plan (an EowcSort upstream in the same fragment) provides. A different input mode —\n        // PROCESSING_TIME is reserved, unimplemented — must fail here, not silently run against\n        // rows whose ordering guarantee does not hold.\n        // An out-of-range wire value decodes as `Unspecified` through the accessor, which would\n        // silently run an unknown future mode as event-time — the one contract this executor's\n        // correctness rests on. Reject it like every other enum in this decode path; a raw 0\n        // (genuinely unset) is accepted as event-time since this frontend always writes it.\n        if node.input_mode != 0 && node.input_mode() == MatchRecognizeInputMode::Unspecified {\n            return Err(\n                anyhow::anyhow!(\"unknown MATCH_RECOGNIZE input mode: {}\", node.input_mode).into(),\n            );\n        }\n        match node.input_mode() {\n            MatchRecognizeInputMode::Unspecified | MatchRecognizeInputMode::EventTime => {}\n            other => {\n                return Err(\n                    anyhow::anyhow!(\"unsupported MATCH_RECOGNIZE input mode: {other:?}\").into(),\n                );\n            }\n        }\n\n        let partition_key_indices = node.partition_by.iter().map(|&i| i as usize).collect();\n        // ORDER BY is carried as `ColumnOrder`. v1 only supports the default ascending order (the\n        // binder rejects anything else); assert it here too so a non-ascending plan fails fast\n        // rather than being silently sorted ascending by the executor.\n        let order_key_indices = node\n            .order_by\n            .iter()\n            .map(|c| {\n                let co = ColumnOrder::from_protobuf(c);\n                if co.order_type != OrderType::ascending() {\n                    return Err(anyhow::anyhow!(\n                        \"MATCH_RECOGNIZE only supports the default ascending ORDER BY, got {:?}\",\n                        co.order_type\n                    )","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/stream/src/from_proto/match_recognize.rs#L46-L82","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Use the default (event-time) input mode for MATCH_RECOGNIZE — do not override the input mode in the query/planner.","Align frontend and compute node versions so both support the requested mode.","Inspect the serialized plan's `input_mode` value and correct the planner that set it.","If a new mode is needed, implement its handling in the executor before enabling it in the frontend."],"exampleFix":"// before\nlet mode = MatchRecognizeInputMode::ProcessingTime; // unsupported\n// after\nlet mode = MatchRecognizeInputMode::EventTime; // v1 supported mode","handlingStrategy":"validation","validationCode":"// restrict modes at the source\nlet allowed = matches!(node.input_mode(), MatchRecognizeInputMode::Unspecified | MatchRecognizeInputMode::EventTime);\nif !allowed { return Err(anyhow!(\"only event-time MATCH_RECOGNIZE is supported\")); }","typeGuard":"fn is_event_time(m: MatchRecognizeInputMode) -> bool {\n    matches!(m, MatchRecognizeInputMode::Unspecified | MatchRecognizeInputMode::EventTime)\n}","tryCatchPattern":"match node.input_mode() { Unspecified | EventTime => {}, other => return Err(anyhow!(\"unsupported MATCH_RECOGNIZE input mode: {other:?}\")) }","preventionTips":["Do not request non-event-time MATCH_RECOGNIZE modes in queries until supported.","Add frontend-side checks rejecting unsupported modes with a user-friendly message.","Keep planner/stream enum definitions in sync."],"tags":["rust","streaming","match-recognize","enum"],"backgroundTag":"unsupported-enum-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}