Function mz_sql::pure::purify_statement

source ·
pub async fn purify_statement(
    catalog: impl SessionCatalog,
    now: u64,
    stmt: Statement<Aug>,
    storage_configuration: &StorageConfiguration
) -> (Result<PurifiedStatement, PlanError>, Option<ClusterId>)
Expand description

Purifies a statement, removing any dependencies on external state.

See the section on purification in the crate documentation for details.

Note that this doesn’t handle CREATE MATERIALIZED VIEW, which is handled by purify_create_materialized_view_options instead. This could be made more consistent by a refactoring discussed here: https://github.com/MaterializeInc/materialize/pull/23870#discussion_r1435922709