Skip to content

Commit d57133e

Browse files
committed
move ValidationException to exceptions.py, make to_snapshot required in validation_history
1 parent b10a0bf commit d57133e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

pyiceberg/exceptions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,7 @@ class CommitStateUnknownException(RESTError):
122122

123123
class WaitingForLockException(Exception):
124124
"""Need to wait for a lock, try again."""
125+
126+
127+
class ValidationException(Exception):
128+
"""Raised when validation fails."""

pyiceberg/table/update/validate.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,17 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
from typing import Optional
1817

18+
from pyiceberg.exceptions import ValidationException
1919
from pyiceberg.manifest import ManifestContent, ManifestFile
2020
from pyiceberg.table import Table
2121
from pyiceberg.table.snapshots import Operation, Snapshot, ancestors_between
2222

2323

24-
class ValidationException(Exception):
25-
"""Raised when validation fails."""
26-
27-
2824
def validation_history(
2925
table: Table,
3026
from_snapshot: Snapshot,
31-
to_snapshot: Optional[Snapshot],
27+
to_snapshot: Snapshot,
3228
matching_operations: set[Operation],
3329
manifest_content_filter: ManifestContent,
3430
) -> tuple[list[ManifestFile], set[Snapshot]]:

0 commit comments

Comments
 (0)