Skip to main content

validate_index_clusters

Function validate_index_clusters 

Source
pub(super) fn validate_index_clusters(
    fqn: &FullyQualifiedName,
    indexes: &[CreateIndexStatement<Raw>],
    offsets: &[usize],
    errors: &mut Vec<ValidationError>,
)
Expand description

Validates that all indexes specify a cluster.

Indexes 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 INDEX idx ON table (col) IN CLUSTER quickstart;

Invalid:

CREATE INDEX idx ON table (col);  -- missing cluster