rdblue commented on code in PR #5627: URL: https://github.com/apache/iceberg/pull/5627#discussion_r954170279
########## 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: Can you use `pyiceberg.util.datetime.datetime_to_micros(datetime.now())` to get millisecond precision? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org