jayzhan211 opened a new pull request, #3376:
URL: https://github.com/apache/iceberg-rust/pull/3376
## Which issue does this PR close?
- Closes #3339.
## What changes are included in this PR?
`RestCatalog::update_namespace` returned `FeatureUnsupported`. It now
implements the spec's `updateProperties` (`POST
/v1/{prefix}/namespaces/{namespace}/properties`).
The `Catalog` trait passes the full property set, while the endpoint takes a
delta. The client loads the namespace first, sends keys that are new or changed
as `updates` and keys that are absent as `removals`, and skips the POST when
nothing differs. A 404 maps to `NamespaceNotFound`.
## Are these changes tested?
- Unit tests (mockito): the request body carries only changed and removed
keys, no request is sent when nothing changed, and a 404 from the POST returns
`NamespaceNotFound`.
- The shared catalog suite
(`crates/catalog/loader/tests/namespace_suite.rs`) now runs REST in the
"supported" and "missing namespace" `update_namespace` cases instead of the
"unsupported" one.
## AI Disclosure
Drafted with Claude Code. Areas for reviewers to look at:
- **Full-set semantics.** Keys absent from `properties` are sent as
removals, following the trait doc and the memory/Glue/HMS catalogs. The SQL
catalog only upserts and never removes, so catalogs differ today. Properties a
server adds to the GET response (for example a default `location`) are also
sent as removals when the caller omits them.
- **Not atomic.** A concurrent change between the load and the POST can be
overwritten. Java's `setProperties` / `removeProperties` avoid this by sending
the delta directly; exposing a delta-based API was left out of this PR.
- **Not run locally.** The Docker-based shared suite and `make
generate-public-api` were not run locally. The `public-api.txt` change is the
parameter rename only, edited by hand.
--
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]