We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6609057 commit 3dc0657Copy full SHA for 3dc0657
1 file changed
sqlmesh/core/plan/builder.py
@@ -674,9 +674,11 @@ def _categorize_snapshot(
674
if mode == AutoCategorizationMode.FULL:
675
snapshot.categorize_as(SnapshotChangeCategory.BREAKING, forward_only)
676
elif self._context_diff.indirectly_modified(snapshot.name):
677
- if snapshot.is_materialized_view:
+ if snapshot.is_materialized_view and not forward_only:
678
# We categorize changes as breaking to allow for instantaneous switches in a virtual layer.
679
# Otherwise, there might be a potentially long downtime during MVs recreation.
680
+ # In the case of forward-only changes this optimization is not applicable because we continue using the
681
+ # same (existing) table version.
682
snapshot.categorize_as(SnapshotChangeCategory.INDIRECT_BREAKING, forward_only)
683
return
684
0 commit comments