Fokko commented on code in PR #5627:
URL: https://github.com/apache/iceberg/pull/5627#discussion_r954248007
##########
python/pyiceberg/table/metadata.py:
##########
@@ -103,12 +109,12 @@ def construct_refs(cls, data: Dict[str, Any]):
"""The table’s base location. This is used by writers to determine where
to store data files, manifest files, and table metadata files."""
- table_uuid: Optional[UUID] = Field(alias="table-uuid",
default_factory=uuid4)
+ table_uuid: uuid.UUID = Field(alias="table-uuid",
default_factory=uuid.uuid4)
"""A UUID that identifies the table, generated when the table is created.
Implementations must throw an exception if a table’s UUID does not match
the expected UUID after refreshing metadata."""
- last_updated_ms: int = Field(alias="last-updated-ms")
+ last_updated_ms: int = Field(alias="last-updated-ms",
default_factory=lambda: int(time.time() * 1000))
Review Comment:
I keep forgetting about that helper class, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]