-
Notifications
You must be signed in to change notification settings - Fork 76
feat(rest): implement load table and drop table #438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| /// 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| { | ||
| std::lock_guard guard(session_mutex_); | ||
| PrepareSession(path, headers); | ||
| PrepareSession(path, headers, params); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's reorder params and headers for PrepareSession as well?
| auto check = CheckEndpoint(supported_endpoints_, Endpoint::TableExists()); | ||
| if (!check.has_value()) { | ||
| // Fall back to LoadTable endpoint (GET) | ||
| ICEBERG_ASSIGN_OR_RAISE(auto path, paths_->Table(identifier)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reuse LoadTable instead of calling the client.
close #392 .
close #396 .
close #394 .