Fokko opened a new issue, #4525:
URL: https://github.com/apache/iceberg-python/issues/4525
`SqlCatalog` handles the reserved `exists` namespace property differently
from Java's `JdbcCatalog`:
| | Java `JdbcCatalog` | PyIceberg `SqlCatalog` |
|---|---|---|
| `createNamespace` | Always writes `exists=true` | Only writes it when no
properties are given |
| `loadNamespaceMetadata` | Removes `exists` from the result | Returns it |
| `setProperties` | Rejects `exists` (`Cannot set reserved property`) |
Allows it |
Because PyIceberg skips the marker when properties are given, a namespace
that PyIceberg created with properties disappears if Java removes its last
property. #4503 handles this on the PyIceberg side by re-inserting the marker
on removal, which Java doesn't do.
Proposal:
- Always write `exists=true` in `create_namespace`.
- Hide `exists` from `load_namespace_properties`.
- Reject `exists` as a key in `update_namespace_properties` updates.
Hiding `exists` changes what users see: a namespace created without
properties will return `{}` instead of `{"exists": "true"}`. This should go in
the release notes.
--
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]