File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -208,3 +208,4 @@ def __hash__(self) -> int:
208208
209209
210210TableVersion : TypeAlias = Literal [1 , 2 , 3 ]
211+ ViewVersion : TypeAlias = Literal [1 ]
Original file line number Diff line number Diff line change 2929class View :
3030 """An Iceberg view."""
3131
32- _identifier : Identifier = Field ()
32+ _identifier : Identifier
3333 metadata : ViewMetadata
3434
3535 def __init__ (
Original file line number Diff line number Diff line change 2222
2323from pyiceberg .schema import Schema
2424from pyiceberg .typedef import IcebergBaseModel , Identifier , Properties
25+ from pyiceberg .typedef import ViewVersion as ViewVersionLiteral
2526from pyiceberg .types import transform_dict_value_to_str
2627
2728
@@ -73,7 +74,7 @@ class ViewMetadata(IcebergBaseModel):
7374
7475 view_uuid : str = Field (alias = "view-uuid" )
7576 """A UUID that identifies the view, generated when the view is created."""
76- format_version : int = Field (alias = "format-version" , ge = 1 , le = 1 )
77+ format_version : ViewVersionLiteral = Field (alias = "format-version" , ge = 1 , le = 1 )
7778 """An integer version number for the view format; must be 1"""
7879 location : str = Field ()
7980 """The view's base location; used to create metadata file locations"""
You can’t perform that action at this time.
0 commit comments