Skip to content

Commit 5a4a7ac

Browse files
authored
Merge pull request #592 from splitgraph/bugfix/changeset-empty-existing
Fix `split_changeset_boundaries` running against empty tables.
2 parents 0a00956 + bfef66b commit 5a4a7ac

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

splitgraph/core/fragment_manager.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,12 @@ def record_table_as_patch(
634634
[(image_hash, old_table.table_name, new_schema_spec, old_table.objects)],
635635
)
636636

637-
def split_changeset_boundaries(self, changeset, change_key, objects):
637+
def split_changeset_boundaries(
638+
self, changeset: Changeset, change_key: List[Tuple[str, str]], objects: List[str]
639+
) -> List[Changeset]:
640+
if not objects:
641+
return [changeset]
642+
638643
min_max = self.get_min_max_pks(objects, change_key)
639644
groups = get_chunk_groups([(o, mm[0], mm[1]) for o, mm in zip(objects, min_max)])
640645
group_boundaries = [

0 commit comments

Comments
 (0)