Skip to content

Commit 740db96

Browse files
kaushiksriniFokko
andauthored
Update pyiceberg/table/update/snapshot.py
Co-authored-by: Fokko Driesprong <fokko@apache.org>
1 parent e631ddf commit 740db96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pyiceberg/table/update/snapshot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ def _commit(self) -> UpdatesAndRequirements:
255255
manifest_list_file_path = location_provider.new_metadata_location(file_name)
256256

257257
# get current snapshot id and starting snapshot id, and validate that there are no conflicts
258-
if self._transaction._table.__class__.__name__ != "StagedTable":
258+
from pyiceberg.table import StagedTable
259+
if not isinstance(self._transaction._table, StagedTable):
259260
starting_snapshot = self._transaction.table_metadata.current_snapshot()
260261
current_snapshot = self._transaction._table.refresh().metadata.current_snapshot()
261262
self._validate(starting_snapshot, current_snapshot)

0 commit comments

Comments
 (0)