laskoviymishka commented on code in PR #3309:
URL: https://github.com/apache/iceberg-rust/pull/3309#discussion_r4763908306


##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -1604,6 +1620,60 @@ impl SessionCatalog for RestSessionCatalog {
         table_builder.build()
     }
 
+    async fn unregister_table(
+        &self,
+        context: &SessionContext,
+        table_ident: &TableIdent,
+    ) -> Result<Table> {
+        if !self.supports_endpoint(&V1_UNREGISTER_TABLE).await? {
+            return Err(Error::new(
+                ErrorKind::FeatureUnsupported,
+                "The catalog does not support unregistering tables",
+            ));
+        }
+
+        let client = self.client().await?;

Review Comment:
   Should this drop the cached entry the way 
[`drop_table`](https://github.com/apache/iceberg-rust/blob/22b2d13da3dcaf51b52e5e83c1f10567d4a269e8/crates/catalog/rest/src/catalog.rs#L895-L897)
 does? Every other mutating table op calls `invalidate_table`, and 
`test_table_changes_invalidate_cached_table` doesn't cover unregister. Nothing 
stale is observable today, since the next load gets a 404 and invalidates, so 
this is only for consistency.
   
   ```suggestion
           let client = self.client().await?;
           client.invalidate_table(context, table_ident);
   ```



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