{"record":{"id":"36b043c157119495","repo":"risingwavelabs/risingwave","slug":"reset-config-is-only-supported-for-materialized-vi","errorCode":null,"errorMessage":"RESET CONFIG is only supported for materialized views","messagePattern":"RESET CONFIG is only supported for materialized views","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/frontend/src/handler/mod.rs","lineNumber":1236,"sourceCode":"                        bail_not_implemented!(\"ALTER MATERIALIZED VIEW AS QUERY\");\n                    }\n                    alter_mv::handle_alter_mv(handler_args, name, query).await\n                }\n                AlterViewOperation::SetConfig { entries } => {\n                    if !materialized {\n                        bail!(\"SET CONFIG is only supported for materialized views\");\n                    }\n                    alter_streaming_config::handle_alter_streaming_set_config(\n                        handler_args,\n                        name,\n                        entries,\n                        statement_type,\n                    )\n                    .await\n                }\n                AlterViewOperation::ResetConfig { keys } => {\n                    if !materialized {\n                        bail!(\"RESET CONFIG is only supported for materialized views\");\n                    }\n                    alter_streaming_config::handle_alter_streaming_reset_config(\n                        handler_args,\n                        name,\n                        keys,\n                        statement_type,\n                    )\n                    .await\n                }\n            }\n        }\n\n        Statement::AlterSink { name, operation } => match operation {\n            AlterSinkOperation::AlterConnectorProps {\n                alter_props: changed_props,\n            } => alter_sink_props::handle_alter_sink_props(handler_args, name, changed_props).await,\n            AlterSinkOperation::RenameSink { sink_name } => {\n                alter_rename::handle_rename_sink(handler_args, name, sink_name).await","sourceCodeStart":1218,"sourceCodeEnd":1254,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/handler/mod.rs#L1218-L1254","documentation":"ALTER VIEW ... RESET CONFIG resets streaming configuration keys back to defaults. The handler only supports this operation on materialized views; issuing it on a regular (non-materialized) view is rejected up front with this error because regular views have no streaming configuration to reset.","triggerScenarios":"Running `ALTER VIEW <name> RESET ( key1, ... )` where <name> resolves to a plain view rather than a materialized view, i.e. the `materialized` flag in the alter-view handler is false.","commonSituations":"Developers confusing plain views with materialized views in RisingWave; copying a config-reset statement written for an MV and applying it to a regular view; scripts that iterate over all relations in a schema and try to reset configs uniformly.","solutions":["Target a materialized view instead: run `ALTER MATERIALIZED VIEW <name> RESET (...)` on the actual MV.","If the object should be a materialized view, create one (`CREATE MATERIALIZED VIEW`) and reset its config there.","Remove the RESET CONFIG statement for plain views, since they carry no streaming config."],"exampleFix":"// before\nALTER VIEW my_view RESET (parallelism);\n// after\nALTER MATERIALIZED VIEW my_mv RESET (parallelism);","handlingStrategy":"validation","validationCode":"-- Verify the target is a materialized view before issuing RESET CONFIG\nSELECT relation_kind FROM rw_catalog.rw_relations\nWHERE name = 'my_view';\n-- proceed only if relation_kind = 'materialized-view'","typeGuard":"fn is_materialized_view(relation_kind: &str) -> bool {\n    relation_kind == \"materialized-view\"\n}","tryCatchPattern":"match session.alter_view_reset_config(name, keys).await {\n    Err(e) if e.message().contains(\"only supported for materialized views\") => {\n        // surface: use ALTER MATERIALIZED VIEW instead\n    }\n    other => other?,\n}","preventionTips":["Check rw_relations catalog for the relation kind before ALTER operations.","Use ALTER MATERIALIZED VIEW syntax explicitly for MVs.","Never apply config-reset statements to plain views."],"tags":["sql","unsupported-operation","materialized-view"],"backgroundTag":"unsupported-operation","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}