File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
sqlmesh/core/state_sync/db Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -113,12 +113,14 @@ def unpause_snapshots(
113113 snapshots : t .Collection [SnapshotInfoLike ],
114114 unpaused_dt : TimeLike ,
115115 ) -> None :
116- unrestorable_snapshots_by_forward_only : t .Dict [bool , t .List [str ]] = defaultdict (list )
116+ unrestorable_snapshots_by_forward_only : t .Dict [bool , t .List [SnapshotNameVersion ]] = (
117+ defaultdict (list )
118+ )
117119
118120 for snapshot in snapshots :
119121 # We need to mark all other snapshots that have opposite forward only status as unrestorable
120122 unrestorable_snapshots_by_forward_only [not snapshot .is_forward_only ].append (
121- snapshot .name
123+ snapshot .name_version
122124 )
123125
124126 updated_ts = now_timestamp ()
@@ -143,10 +145,11 @@ def unpause_snapshots(
143145 )
144146
145147 # Mark unrestorable snapshots
146- for forward_only , snapshot_names in unrestorable_snapshots_by_forward_only .items ():
148+ for forward_only , snapshot_name_versions in unrestorable_snapshots_by_forward_only .items ():
147149 forward_only_exp = exp .column ("forward_only" ).is_ (exp .convert (forward_only ))
148- for where in snapshot_name_filter (
149- snapshot_names ,
150+ for where in snapshot_name_version_filter (
151+ self .engine_adapter ,
152+ snapshot_name_versions ,
150153 batch_size = self .SNAPSHOT_BATCH_SIZE ,
151154 ):
152155 self .engine_adapter .update_table (
You can’t perform that action at this time.
0 commit comments