Skip to content

[materialized_view] why do not use swap instead of drop then create #49

@Mrzyxing

Description

@Mrzyxing

After changed materialized view(or called MV in rest of content), we will drop exist MV then create as follow code:

{% macro starrocks__get_replace_materialized_view_as_sql(relation, sql, existing_relation, backup_relation, intermediate_relation) %}
    {{ starrocks__get_drop_relation_sql(existing_relation) }}
    {{ get_create_materialized_view_as_sql(relation, sql) }}
{% endmacro %}

And I think there are better way to alter asynchronous MV because starrocks support atomic swap as this doc.
I will fork as internal project to use swap but also want to konw more ideas of community.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions