diff --git a/pyiceberg/table/update/validate.py b/pyiceberg/table/update/validate.py index 55c34676e3..32aabac28c 100644 --- a/pyiceberg/table/update/validate.py +++ b/pyiceberg/table/update/validate.py @@ -27,7 +27,7 @@ VALIDATE_DATA_FILES_EXIST_OPERATIONS = {Operation.OVERWRITE, Operation.REPLACE, Operation.DELETE} -def validation_history( +def _validation_history( table: Table, from_snapshot: Snapshot, to_snapshot: Snapshot, @@ -100,7 +100,7 @@ def _deleted_data_files( if parent_snapshot is None: return - manifests, snapshot_ids = validation_history( + manifests, snapshot_ids = _validation_history( table, parent_snapshot, starting_snapshot, diff --git a/tests/table/test_validate.py b/tests/table/test_validate.py index 74a0b59566..1da8718805 100644 --- a/tests/table/test_validate.py +++ b/tests/table/test_validate.py @@ -25,7 +25,7 @@ from pyiceberg.manifest import ManifestContent, ManifestEntry, ManifestEntryStatus, ManifestFile from pyiceberg.table import Table from pyiceberg.table.snapshots import Operation, Snapshot, Summary -from pyiceberg.table.update.validate import _deleted_data_files, _validate_deleted_data_files, validation_history +from pyiceberg.table.update.validate import _deleted_data_files, _validate_deleted_data_files, _validation_history @pytest.fixture @@ -69,7 +69,7 @@ def mock_read_manifest_side_effect(self: Snapshot, io: FileIO) -> list[ManifestF return [] with patch("pyiceberg.table.snapshots.Snapshot.manifests", new=mock_read_manifest_side_effect): - manifests, snapshots = validation_history( + manifests, snapshots = _validation_history( table, oldest_snapshot, newest_snapshot, @@ -99,7 +99,7 @@ def test_validation_history_fails_on_snapshot_with_no_summary( ) with patch("pyiceberg.table.update.validate.ancestors_between", return_value=[snapshot_with_no_summary]): with pytest.raises(ValidationException): - validation_history( + _validation_history( table, oldest_snapshot, newest_snapshot, @@ -129,7 +129,7 @@ def mock_read_manifest_side_effect(self: Snapshot, io: FileIO) -> list[ManifestF with patch("pyiceberg.table.snapshots.Snapshot.manifests", new=mock_read_manifest_side_effect): with patch("pyiceberg.table.update.validate.ancestors_between", return_value=missing_oldest_snapshot): with pytest.raises(ValidationException): - validation_history( + _validation_history( table, oldest_snapshot, newest_snapshot,