{"record":{"id":"cf10212a739b57ad","repo":"risingwavelabs/risingwave","slug":"row-sequential-scan-should-not-have-input-executor-cf1021","errorCode":null,"errorMessage":"Row sequential scan should not have input executor!","messagePattern":"Row sequential scan should not have input executor!","errorType":"validation","errorClass":"BatchError","httpStatus":null,"severity":"error","filePath":"src/batch/executors/src/executor/sys_row_seq_scan.rs","lineNumber":60,"sourceCode":"    ) -> Self {\n        Self {\n            table_id,\n            schema,\n            column_indices,\n            identity,\n            sys_catalog_reader,\n        }\n    }\n}\n\npub struct SysRowSeqScanExecutorBuilder {}\n\nimpl BoxedExecutorBuilder for SysRowSeqScanExecutorBuilder {\n    async fn new_boxed_executor(\n        source: &ExecutorBuilder<'_>,\n        inputs: Vec<BoxedExecutor>,\n    ) -> Result<BoxedExecutor> {\n        ensure!(\n            inputs.is_empty(),\n            \"Row sequential scan should not have input executor!\"\n        );\n        let seq_scan_node = try_match_expand!(\n            source.plan_node().get_node_body().unwrap(),\n            NodeBody::SysRowSeqScan\n        )?;\n        let sys_catalog_reader = source.context().catalog_reader();\n\n        let table_id = seq_scan_node.get_table_id();\n\n        let column_indices = seq_scan_node\n            .column_descs\n            .iter()\n            .map(|d| d.column_id as usize)\n            .collect_vec();\n        let schema = Schema::new(\n            seq_scan_node","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/batch/executors/src/executor/sys_row_seq_scan.rs#L42-L78","documentation":"SysRowSeqScanExecutorBuilder requires zero child executors. The system row sequential scan reads rows from a system (catalog/information-schema style) table and is a leaf plan node, so any input executor indicates the plan tree was built with an invalid child.","triggerScenarios":"new_boxed_executor receives a non-empty `inputs` vector because a SysRowSeqScan plan node has children in the batch plan.","commonSituations":"Planner bugs attaching children to system-table scan nodes when planning queries against system catalogs; hand-assembled plan fragments in tests; refactors of node arity.","solutions":["Inspect the plan for the system-table query and confirm SysRowSeqScan is a leaf; fix the planner if it attaches children.","Ensure frontend translation builds SysRowSeqScan with an empty children list.","Pass an empty inputs vec when invoking this builder manually in tests.","Report an internal bug with the query if the plan appears correct."],"exampleFix":"// before\nBatchPlanNode::new(NodeBody::SysRowSeqScan(node), vec![child])\n// after\nBatchPlanNode::new(NodeBody::SysRowSeqScan(node), vec![])","handlingStrategy":"try-catch","validationCode":"// Rust: assert system-table scan is a leaf\nassert!(inputs.is_empty(), \"SysRowSeqScan must be a leaf node\");","typeGuard":"fn is_leaf(inputs: &[BoxedExecutor]) -> bool { inputs.is_empty() }","tryCatchPattern":"if let Err(e) = exec.build(plan).await {\n    if e.to_string().contains(\"should not have input executor\") {\n        // log the system-table query plan and file an internal bug\n    }\n}","preventionTips":["Build SysRowSeqScan nodes with empty children in the planner.","Add planner tests for system-catalog queries.","Review node arity when refactoring executor builders."],"tags":["batch-executor","system-table","planner","rust","internal-invariant"],"backgroundTag":"internal-invariant-violation","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"}