File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed
Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -281,9 +281,7 @@ def build(self, plan: EvaluatablePlan) -> t.List[PlanStage]:
281281 snapshots_with_schema_migration = [
282282 snapshots [s_id ]
283283 for s_id in dag .subdag (* snapshot_ids_with_schema_migration )
284- if snapshots [s_id ].is_paused
285- and snapshots [s_id ].is_model
286- and not snapshots [s_id ].is_symbolic
284+ if snapshots [s_id ].supports_schema_migration_in_prod
287285 ]
288286
289287 snapshots_to_intervals = self ._missing_intervals (
Original file line number Diff line number Diff line change @@ -1477,19 +1477,19 @@ def expiration_ts(self) -> int:
14771477 check_categorical_relative_expression = False ,
14781478 )
14791479
1480+ @property
1481+ def supports_schema_migration_in_prod (self ) -> bool :
1482+ """Returns whether or not this snapshot supports schema migration when deployed to production."""
1483+ return self .is_paused and self .is_model and not self .is_symbolic
1484+
14801485 @property
14811486 def requires_schema_migration_in_prod (self ) -> bool :
14821487 """Returns whether or not this snapshot requires a schema migration when deployed to production."""
1483- return (
1484- self .is_paused
1485- and self .is_model
1486- and not self .is_symbolic
1487- and (
1488- (self .previous_version and self .previous_version .version == self .version )
1489- or self .model .forward_only
1490- or bool (self .model .physical_version )
1491- or not self .virtual_environment_mode .is_full
1492- )
1488+ return self .supports_schema_migration_in_prod and (
1489+ (self .previous_version and self .previous_version .version == self .version )
1490+ or self .model .forward_only
1491+ or bool (self .model .physical_version )
1492+ or not self .virtual_environment_mode .is_full
14931493 )
14941494
14951495 @property
You can’t perform that action at this time.
0 commit comments