File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 3232from pyiceberg .schema import Schema
3333from pyiceberg .table .update import (
3434 AddPartitionSpecUpdate ,
35+ AssertDefaultSpecId ,
3536 AssertLastAssignedPartitionId ,
3637 SetDefaultSpecUpdate ,
3738 TableRequirement ,
@@ -169,7 +170,11 @@ def _commit(self) -> UpdatesAndRequirements:
169170 updates = (SetDefaultSpecUpdate (spec_id = new_spec .spec_id ),)
170171
171172 required_last_assigned_partitioned_id = self ._transaction .table_metadata .last_partition_id
172- requirements = (AssertLastAssignedPartitionId (last_assigned_partition_id = required_last_assigned_partitioned_id ),)
173+ default_spec_id = self ._transaction .table_metadata .default_spec_id
174+ requirements = (
175+ AssertLastAssignedPartitionId (last_assigned_partition_id = required_last_assigned_partitioned_id ),
176+ AssertDefaultSpecId (default_spec_id = default_spec_id ),
177+ )
173178
174179 return updates , requirements
175180
You can’t perform that action at this time.
0 commit comments