gty404 commented on code in PR #438:
URL: https://github.com/apache/iceberg-cpp/pull/438#discussion_r2647433281


##########
src/iceberg/catalog.h:
##########
@@ -75,7 +75,7 @@ class ICEBERG_EXPORT Catalog {
   /// \return Status::OK if dropped successfully;
   ///         ErrorKind::kNoSuchNamespace if the namespace does not exist;
   ///         ErrorKind::kNotAllowed if the namespace is not empty
-  virtual Status DropNamespace(const Namespace& ns) = 0;
+  virtual Result<bool> DropNamespace(const Namespace& ns) = 0;

Review Comment:
   For the scenarios where the namespace does not exist or is not empty, return 
"NoSuchNamespace/NamespaceNotEmpty" and unify the return with Status. I think 
it is more suitable for the caller to handle it, and the Status can also 
include the specific namespace name. In scenarios with multiple nested calls, 
the outermost layer can more easily identify the root cause.



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