{"record":{"id":"1a1579185b946378","repo":"risingwavelabs/risingwave","slug":"unsupported-stream-scan-type-for-auto-refresh-sche","errorCode":null,"errorMessage":"unsupported stream_scan_type for auto refresh schema: {:?}","messagePattern":"unsupported stream_scan_type for auto refresh schema: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/meta/src/stream/stream_graph/fragment.rs","lineNumber":444,"sourceCode":"        }\n        _ => {\n            return Err(anyhow!(\n                \"expect PbNodeBody::StreamScan or PbNodeBody::Project but got: {:?}\",\n                stream_input_node.node_body\n            )\n            .into());\n        }\n    };\n    let PbNodeBody::StreamScan(scan) = stream_scan_node.node_body.as_ref().unwrap() else {\n        return Err(anyhow!(\n            \"expect PbNodeBody::StreamScan but got: {:?}\",\n            stream_scan_node.node_body\n        )\n        .into());\n    };\n    let stream_scan_type = PbStreamScanType::try_from(scan.stream_scan_type).unwrap();\n    if stream_scan_type != PbStreamScanType::ArrangementBackfill {\n        return Err(anyhow!(\n            \"unsupported stream_scan_type for auto refresh schema: {:?}\",\n            stream_scan_type\n        )\n        .into());\n    }\n    let [merge_node, _batch_plan_node] = stream_scan_node.input.as_slice() else {\n        panic!(\n            \"the number of StreamScan inputs is not 2: {:?}\",\n            stream_scan_node.input\n        );\n    };\n    let NodeBody::Merge(_) = merge_node.node_body.as_ref().unwrap() else {\n        return Err(anyhow!(\n            \"expect PbNodeBody::Merge but got: {:?}\",\n            merge_node.node_body\n        )\n        .into());\n    };","sourceCodeStart":426,"sourceCodeEnd":462,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/meta/src/stream/stream_graph/fragment.rs#L426-L462","documentation":"Auto schema refresh for sinks is only supported when the stream scan is an `ArrangementBackfill`. If the resolved StreamScan node's `stream_scan_type` is anything else (e.g. MView, IndexBackfill, SharedSource), this error is returned, aborting creation of the streaming job.","triggerScenarios":"`generate_streaming_job` -> `check_sink_fragments_support_refresh_schema` with a StreamScan whose `stream_scan_type` != `PbStreamScanType::ArrangementBackfill`.","commonSituations":"Creating a sink whose upstream is a materialized view or index rather than a raw table with backfill, while expecting auto schema refresh to work; refreshing schema on sinks over sources; feature/flag differences between versions.","solutions":["Create the sink over a plain table (with backfill) instead of a materialized view or index if auto schema refresh is required.","Check the sink's upstream type with `SHOW` / catalog and confirm it uses arrangement backfill.","Recreate the sink without expecting schema refresh, and handle schema changes manually (drop/recreate).","Verify the feature flag / version supporting refresh schema is consistent across the cluster."],"exampleFix":"-- before: sink over MV with auto schema refresh expectation\nCREATE SINK s FROM mv_orders WITH (...);\n-- after: sink over the base table arrangement backfill\nCREATE SINK s FROM orders WITH (...);","handlingStrategy":"validation","validationCode":"let scan_type = PbStreamScanType::try_from(scan.stream_scan_type)?;\nif scan_type != PbStreamScanType::ArrangementBackfill {\n    return Err(\"auto schema refresh requires ArrangementBackfill sink\".into());\n}","typeGuard":"fn is_arrangement_backfill(scan: &PbStreamScan) -> bool {\n    PbStreamScanType::try_from(scan.stream_scan_type)\n        .map(|t| t == PbStreamScanType::ArrangementBackfill)\n        .unwrap_or(false)\n}","tryCatchPattern":null,"preventionTips":["Sink over plain tables (backfill) for auto schema refresh; not MVs, indexes, or sources.","Document supported sink topologies for schema evolution in your deploy runbook.","Pre-check upstream object type before issuing ALTER that triggers schema refresh."],"tags":["risingwave","schema-change","stream-scan","unsupported-feature"],"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"}