risingwavelabs/risingwave · error · NotSupported
source has no unaligned_join
Error message
source has no unaligned_join
What it means
This is a deliberate `NotSupported` error raised by `handle_alter_streaming_enable_unaligned_join` when the ALTER ... SET UNALIGNED JOIN target is a shared source rather than a materialized view or sink. Only streaming jobs (MV/sink/table jobs) have fragment-level unaligned join support; a source relation has no such streaming fragments, so the command bails with "source has no unaligned_join".
Solutions
- Target a materialized view or sink instead: `ALTER MATERIALIZED VIEW mv_name SET ...` / the corresponding sink command.
- Check the relation type first with `SHOW MATERIALIZED VIEWS` / `SHOW SOURCES` before issuing the ALTER.
- If you intended to alter the MV that reads from the source, use the MV's name, not the source's.
- Remove the command for sources in automation scripts (filter to MVs/sinks only).
Example fix
-- before ALTER SOURCE my_source SET UNALIGNED JOIN ...; -- after ALTER MATERIALIZED VIEW my_mv SET UNALIGNED JOIN ...;
Defensive patterns
Strategy: validation
Validate before calling
-- verify the target is an MV or sink before running the unaligned-join ALTER SELECT name FROM rw_catalog.rw_materialized_views WHERE name = 'target';
Try / catch
// caller side
match run_alter_unaligned_join(target) {
Err(e) if e.to_string().contains("no unaligned_join") => {
// skip non-MV/sink relations or rewrite command for the owning MV
}
other => other?,
} Prevention
- Filter automation scripts to materialized views and sinks when tuning unaligned join.
- Check relation type in rw_catalog before issuing ALTER commands.
- Document that sources define ingestion only and carry no join fragments.
- Use consistent naming conventions (e.g. mv_*, sink_*) so operators pick the right object type.
When it happens
Trigger: Executing `ALTER SOURCE ... SET UNALIGNED JOIN` (or the equivalent handler path) on a source; specifically a shared source (`is_shared()`) whose id resolves to a shared-source job id instead of a stream job id.
Common situations: Operators applying an unaligned-join tuning command across all relations in a script without filtering relation types; confusion between sources (ingestion definitions) and materialized views (streaming compute jobs) when enabling the unaligned join feature.
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
- ALTER STREAMING ENABLE UNALIGNED JOIN is only supported in…
- Failed to get secret in secret manager, secret_id
- system table has no unaligned_join
- view has no unaligned_join
- {0}
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/f304c515d25aa076.
Report an issue: GitHub.
Appendix: source
Thrown at src/frontend/src/handler/alter_streaming_enable_unaligned_join.rs:42
pub async fn handle_alter_streaming_enable_unaligned_join(
handler_args: HandlerArgs,
name: ObjectName,
enable: bool,
) -> Result<RwPgResponse> {
if cfg!(debug_assertions) {
let session = handler_args.session.clone();
let job_id = {
let mut binder = Binder::new_for_system(&session);
Binder::validate_cross_db_reference(&session.database(), &name)?;
let not_found_err = CatalogError::not_found("stream job", name.to_string());
if let Ok(relation) = binder.bind_catalog_relation_by_object_name(&name, true) {
match relation {
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(),
));
}View on GitHub (pinned to 6469eb736d)