Function mz_sql::pure::purify_create_sink

source ·
async fn purify_create_sink(
    catalog: impl SessionCatalog,
    create_sink_stmt: CreateSinkStatement<Aug>,
    storage_configuration: &StorageConfiguration,
) -> Result<PurifiedStatement, PlanError>
Expand description

Checks that the sink described in the statement can connect to its external resources.

We must not leave any state behind in the Kafka broker, so just ensure that we can connect. This means we don’t ensure that we can create the topic and introduces TOCTOU errors, but creating an inoperable sink is infinitely preferable to leaking state in users’ environments.