Standing-Man commented on code in PR #1724:
URL: https://github.com/apache/iceberg-rust/pull/1724#discussion_r2418876028


##########
crates/catalog/sql/src/catalog.rs:
##########
@@ -765,13 +765,30 @@ impl Catalog for SqlCatalog {
 
     async fn register_table(
         &self,
-        _table_ident: &TableIdent,
-        _metadata_location: String,
+        table_ident: &TableIdent,
+        metadata_location: String,
     ) -> Result<Table> {
-        Err(Error::new(
-            ErrorKind::FeatureUnsupported,
-            "Registering a table is not supported yet",
-        ))
+        if self.table_exists(table_ident).await? {
+            return table_already_exists_err(table_ident);
+        }
+
+        let metadata = TableMetadata::read_from(&self.fileio, 
&metadata_location).await?;

Review Comment:
   Hi @CTTY, When testing `register_table`, I noticed that the `metadata` 
couldn’t be fetched. I’m a bit confused — is this caused by the implementation 
of test case  `test_register_table` or the implementation of `register_table`?



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