risingwavelabs/risingwave · error

ALTER VIEW SET STREAMING_ENABLE_UNALIGNED_JOIN is not…

Error message

ALTER VIEW SET STREAMING_ENABLE_UNALIGNED_JOIN is not supported. Only supported for materialized views

What it means

In the ALTER VIEW handler, `ALTER VIEW ... SET STREAMING_ENABLE_UNALIGNED_JOIN` was executed against a view rather than a materialized view. The unaligned-join streaming option only applies to materialized views (which own stream fragments), so the statement is rejected.

Solutions

  1. Use `ALTER MATERIALIZED VIEW <name> SET STREAMING_ENABLE_UNALIGNED_JOIN = <bool>;`
  2. Confirm the object is an MV with `SHOW MATERIALIZED VIEWS LIKE '<name>';`
  3. Remove the setting if the target is a plain view — it has no streaming join

Example fix

// before
ALTER VIEW my_v SET STREAMING_ENABLE_UNALIGNED_JOIN = true;
// after
ALTER MATERIALIZED VIEW my_mv SET STREAMING_ENABLE_UNALIGNED_JOIN = true;
Defensive patterns

Strategy: validation

Validate before calling

SELECT name FROM rw_catalog.rw_mviews WHERE name = 'my_object';
-- only proceed with ALTER ... SET STREAMING_ENABLE_UNALIGNED_JOIN if a row exists

Prevention

When it happens

Trigger: Running `ALTER VIEW <name> SET STREAMING_ENABLE_UNALIGNED_JOIN = true|false` where `<name>` is a regular VIEW (materialized = false).

Common situations: Confusing `ALTER VIEW` with `ALTER MATERIALIZED VIEW`; applying tuning knobs documented for MVs to plain views.

Related errors


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

Appendix: source

Thrown at src/frontend/src/handler/mod.rs:1206

                        PbThrottleTarget::Mv,
                        rate_limit_type_to_throttle_type(rate_limit.rate_limit_type),
                        name,
                        rate_limit.rate_limit,
                    )
                    .await
                }
                AlterViewOperation::SwapRenameView { target_view } => {
                    alter_swap_rename::handle_swap_rename(
                        handler_args,
                        name,
                        target_view,
                        statement_type,
                    )
                    .await
                }
                AlterViewOperation::SetStreamingEnableUnalignedJoin { enable } => {
                    if !materialized {
                        bail!(
                            "ALTER VIEW SET STREAMING_ENABLE_UNALIGNED_JOIN is not supported. Only supported for materialized views"
                        );
                    }
                    alter_streaming_enable_unaligned_join::handle_alter_streaming_enable_unaligned_join(handler_args, name, enable).await
                }
                AlterViewOperation::AsQuery { query } => {
                    if !materialized {
                        bail_not_implemented!("ALTER VIEW AS QUERY");
                    }
                    // `ALTER MATERIALIZED VIEW AS QUERY` is only available in development build now.
                    if !cfg!(debug_assertions) {
                        bail_not_implemented!("ALTER MATERIALIZED VIEW AS QUERY");
                    }
                    alter_mv::handle_alter_mv(handler_args, name, query).await
                }
                AlterViewOperation::SetConfig { entries } => {
                    if !materialized {
                        bail!("SET CONFIG is only supported for materialized views");

View on GitHub (pinned to 6469eb736d)