File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -344,6 +344,15 @@ def _build_restatements(
344344 for s_id in dag :
345345 snapshot = self ._context_diff .snapshots [s_id ]
346346
347+ # Since we are traversing the graph in topological order and the largest interval range is pushed down
348+ # the graph we just have to check our immediate parents in the graph and not the whole upstream graph.
349+ restating_parents = [
350+ self ._context_diff .snapshots [s ] for s in snapshot .parents if s in restatements
351+ ]
352+
353+ if not restating_parents and snapshot .name not in restate_models :
354+ continue
355+
347356 if not forward_only_preview_needed :
348357 if self ._is_dev and not snapshot .is_paused :
349358 self ._console .log_warning (
@@ -362,15 +371,6 @@ def _build_restatements(
362371 logger .info ("Skipping restatement for model '%s'" , snapshot .name )
363372 continue
364373
365- # Since we are traversing the graph in topological order and the largest interval range is pushed down
366- # the graph we just have to check our immediate parents in the graph and not the whole upstream graph.
367- restating_parents = [
368- self ._context_diff .snapshots [s ] for s in snapshot .parents if s in restatements
369- ]
370-
371- if not restating_parents and snapshot .name not in restate_models :
372- continue
373-
374374 possible_intervals = {
375375 restatements [p .snapshot_id ] for p in restating_parents if p .is_incremental
376376 }
You can’t perform that action at this time.
0 commit comments