Skip to content

Commit 9580060

Browse files
committed
Fix: Reporting the absence of physical layer updates when explaining a plan
1 parent 4b478c4 commit 9580060

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

sqlmesh/core/plan/explainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def visit_after_all_stage(self, stage: stages.AfterAllStage) -> Tree:
9090
return Tree("[bold]Execute after all statements[/bold]")
9191

9292
def visit_physical_layer_update_stage(self, stage: stages.PhysicalLayerUpdateStage) -> Tree:
93-
if not stage.snapshots:
93+
if not stage.snapshots_with_missing_intervals:
9494
return Tree("[bold]SKIP: No physical layer updates to perform[/bold]")
9595

9696
tree = Tree(

sqlmesh/core/plan/stages.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from sqlmesh.core.snapshot.definition import (
99
DeployabilityIndex,
1010
Snapshot,
11+
SnapshotChangeCategory,
1112
SnapshotTableInfo,
1213
SnapshotId,
1314
Interval,
@@ -255,7 +256,13 @@ def build(self, plan: EvaluatablePlan) -> t.List[PlanStage]:
255256
if s.is_paused
256257
and s.is_model
257258
and not s.is_symbolic
258-
and (not deployability_index_for_creation.is_representative(s) or s.is_view)
259+
and (
260+
not deployability_index_for_creation.is_representative(s)
261+
or (
262+
s.is_view
263+
and s.change_category == SnapshotChangeCategory.INDIRECT_NON_BREAKING
264+
)
265+
)
259266
]
260267

261268
snapshots_to_intervals = self._missing_intervals(

0 commit comments

Comments
 (0)