Skip to main content

validate_mv_cluster

Function validate_mv_cluster 

Source
pub(super) fn validate_mv_cluster(
    fqn: &FullyQualifiedName,
    stmt: &Statement,
    main_offset: usize,
    errors: &mut Vec<ValidationError>,
)
Expand description

Validates that a materialized view specifies a cluster.

Materialized views in Materialize must specify which cluster they run on using the IN CLUSTER clause. This ensures deterministic deployment and avoids implicit cluster selection.

ยงExample

Valid:

CREATE MATERIALIZED VIEW mv IN CLUSTER quickstart AS SELECT ...;

Invalid:

CREATE MATERIALIZED VIEW mv AS SELECT ...;  -- missing cluster