sohailshk commented on code in PR #4353:
URL: https://github.com/apache/iceberg-python/pull/4353#discussion_r4560461707
##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -376,6 +375,16 @@ class TableResponse(IcebergBaseModel):
storage_credentials: list[StorageCredential] =
Field(alias="storage-credentials", default_factory=list)
labels: Labels = Field(default_factory=Labels)
+ @field_validator("config", mode="before")
Review Comment:
Agreed, that is easier to follow. Done in c76e0328: added `NullableList` and
`NullableProperties` (an `Annotated` type with a `BeforeValidator` that turns
`null` into an empty list / map) and switched the fields to them, so the four
`field_validator`s are gone. `ConfigResponse.defaults` and `overrides` are now
typed `Properties` instead of `Properties | None`, since a `null` already came
back as `{}`. The REST catalog tests still pass.
--
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]