risingwavelabs/risingwave · error · NotSupported
view has no unaligned_join
Error message
view has no unaligned_join
What it means
The unaligned-join toggle only applies to relations backed by a stream job with a sync log store. Shares (shared relations referenced across databases) carry no such job, so the handler rejects them with a NotSupported error telling the user to target a materialized view or sink. (Note: the message says 'view' but the match arm is Relation::Share.)
Solutions
- Apply the ALTER to the concrete materialized view or sink that consumes the share, not the share itself.
- If tuning is needed at the source, alter the original relation in the database that owns it before sharing.
Example fix
// before ALTER STREAMING ENABLE UNALIGNED JOIN my_shared_mv; // after ALTER STREAMING ENABLE UNALIGNED JOIN consumer_db.consumer_mv;
Defensive patterns
Strategy: validation
Validate before calling
-- Resolve the object and reject shares before ALTER: SELECT relation_type FROM rw_catalog.rw_relations WHERE name = 'my_rel'; -- Proceed only when relation_type IS NOT NULL (shares are not alterable jobs); -- prefer altering the concrete MV/sink that consumes the share.
Type guard
fn is_direct_stream_job(relation: &Relation) -> bool {
matches!(relation, Relation::BaseTable(_))
|| matches!(relation, Relation::Source(s) if s.is_shared())
} Prevention
- Never ALTER a share directly; alter the consuming MV or sink.
- Check rw_relations for the object type before running DDL.
- Document that unaligned_join applies to stream jobs, not shared catalog objects.
When it happens
Trigger: Running `ALTER STREAMING ... UNALIGNED JOIN` against a share object (a relation published via CREATE SHARE and bound as Relation::Share) in handle_alter_streaming_enable_unaligned_join.
Common situations: Developers working with cross-database/shared relation features attempt to tune the shared relation itself instead of the consumer materialized view or sink that actually runs the stream job.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- system table has no unaligned_join
- ALTER SINK_RATE_LIMIT is not for sink into table
- ALTER SOURCE_RATE_LIMIT is not for table without source
- ALTER STREAMING ENABLE UNALIGNED JOIN is only supported in…
- backfill order strategy
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/ac59bd1810d823cc.
Report an issue: GitHub.
Appendix: source
Thrown at src/frontend/src/handler/alter_streaming_enable_unaligned_join.rs:56
Relation::Source(s) => {
if s.is_shared() {
s.catalog.id.as_share_source_job_id()
} else {
bail!(ErrorCode::NotSupported(
"source has no unaligned_join".to_owned(),
"Please only target materialized views or sinks".to_owned(),
));
}
}
Relation::BaseTable(t) => t.table_catalog.id.as_job_id(),
Relation::SystemTable(_t) => {
bail!(ErrorCode::NotSupported(
"system table has no unaligned_join".to_owned(),
"Please only target materialized views or sinks".to_owned(),
));
}
Relation::Share(_s) => {
bail!(ErrorCode::NotSupported(
"view has no unaligned_join".to_owned(),
"Please only target materialized views or sinks".to_owned(),
));
}
_ => {
// Other relation types (Subquery, Join, etc.) are not directly describable.
return Err(not_found_err.into());
}
}
} else if let Ok(sink) = binder.bind_sink_by_name(name.clone()) {
sink.sink_catalog.id.as_job_id()
} else {
return Err(not_found_err.into());
}
};
let meta_client = session.env().meta_client();
meta_client
.set_sync_log_store_aligned(job_id, !enable)View on GitHub (pinned to 6469eb736d)