chil-pavn commented on code in PR #240:
URL: https://github.com/apache/iceberg-go/pull/240#discussion_r1901420358


##########
catalog/rest.go:
##########
@@ -626,11 +628,76 @@ func (r *RestCatalog) LoadTable(ctx context.Context, 
identifier table.Identifier
 }
 
 func (r *RestCatalog) DropTable(ctx context.Context, identifier 
table.Identifier) error {
-       return fmt.Errorf("%w: [Rest Catalog] drop table", 
iceberg.ErrNotImplemented)
+       ns, tbl, err := splitIdentForPath(identifier)
+       if err != nil {
+               return err
+       }
+
+       _, err = doDelete[struct{}](
+               ctx,
+               r.baseURI,
+               []string{"namespaces", ns, "tables", tbl},
+               r.cl,
+               map[int]error{
+                       http.StatusNotFound: ErrNoSuchTable,
+               },
+       )
+       return err
 }
 
 func (r *RestCatalog) RenameTable(ctx context.Context, from, to 
table.Identifier) (*table.Table, error) {
-       return nil, fmt.Errorf("%w: [Rest Catalog] rename table", 
iceberg.ErrNotImplemented)
+       fromNs, fromTbl, err := splitIdentForPath(from)
+       if err != nil {
+               return nil, err
+       }
+
+       toNs, toTbl, err := splitIdentForPath(to)
+       if err != nil {
+               return nil, err
+       }

Review Comment:
   @piyushsingariya splitIdentForPath is called in many other places in the 
codebase. I don't think doing that would help.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to