huan233usc commented on code in PR #2692:
URL: https://github.com/apache/iceberg-rust/pull/2692#discussion_r3494003405


##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -412,14 +417,41 @@ impl RestCatalog {
             .get_or_try_init(|| async {
                 let client = HttpClient::new(&self.user_config)?;
                 let catalog_config = RestCatalog::load_config(&client, 
&self.user_config).await?;
+                // The `endpoints` field is optional. An absent field (`None`)
+                // means an older server, so fall back to the standard base 
set;
+                // an explicit list — even an empty one — is taken verbatim.
+                let endpoints = match &catalog_config.endpoints {
+                    Some(advertised) => advertised.iter().cloned().collect(),
+                    None => crate::endpoint::DEFAULT_ENDPOINTS.clone(),
+                };

Review Comment:
   Done -- thanks for suggestion



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