huan233usc opened a new pull request, #2794:
URL: https://github.com/apache/iceberg-rust/pull/2794

   ## Which issue does this PR close?
   
   Follow-up to #2692.
   
   ## What changes are included in this PR?
   
   #2692 parsed the server-advertised `endpoints` from `GET /v1/config` but did 
not
   yet use them. This PR wires the negotiated set into the catalog and starts
   enforcing it:
   
   - **`DEFAULT_ENDPOINTS`** — the base set of namespace/table operations 
assumed
     when a server omits the `endpoints` field or sends an empty list (the two 
are
     treated alike), mirroring Java's `RESTSessionCatalog`.
   - **`RestContext`** stores the negotiated set (advertised list, or the 
default
     base set); **`RestCatalog::supports_endpoint`** queries it.
   - **`table_exists` / `namespace_exists`** now issue the cheap `HEAD` only 
when
     the server advertises the corresponding endpoint, and otherwise fall back 
to a
     `GET` load (treating not-found as `false`), so they keep working against
     servers that don't advertise the `HEAD` routes. This mirrors Java's
     `RESTSessionCatalog.{tableExists,namespaceExists}`.
   
   Enforcing the negotiated set across the remaining operations (and named
   per-route constants) can follow in subsequent PRs.
   
   ## Are these changes tested?
   
   Yes:
   - Unit tests for negotiation (advertised list, absent field, explicit empty 
list)
     and for `{table,namespace}_exists` on both the HEAD and GET-fallback paths.
   - An integration test exercising `supports_endpoint` against the real
     `iceberg-rest-fixture` `GET /v1/config`.
   


-- 
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]

Reply via email to