-
Notifications
You must be signed in to change notification settings - Fork 66
feat: add rename table interface to catalog #281
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
Changes from 6 commits
21940c2
0b0239d
befeff2
564ca06
6697df9
547033e
9d49902
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,8 +21,10 @@ | |
| #pragma once | ||
|
|
||
| #include <memory> | ||
| #include <vector> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why include this? |
||
|
|
||
| #include "iceberg/iceberg_export.h" | ||
| #include "iceberg/result.h" | ||
| #include "iceberg/type_fwd.h" | ||
|
|
||
| namespace iceberg { | ||
|
|
@@ -42,12 +44,23 @@ class ICEBERG_EXPORT Transaction { | |
| /// \return a new AppendFiles | ||
| virtual std::shared_ptr<AppendFiles> NewAppend() = 0; | ||
|
|
||
| /// \brief Apply multiple metadata updates to this transaction | ||
| /// | ||
| /// \param requirements the table requirements to validate | ||
| /// \param updates the table updates to apply | ||
| /// \return Status::OK if all updates were queued successfully | ||
| virtual Status UpdateTable( | ||
|
||
| const std::vector<std::unique_ptr<TableRequirement>>& requirements, | ||
| const std::vector<std::unique_ptr<TableUpdate>>& updates) = 0; | ||
|
|
||
wgtmac marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| /// \brief Apply the pending changes from all actions and commit | ||
| /// | ||
| /// May throw ValidationException if any update cannot be applied to the current table | ||
| /// metadata. May throw CommitFailedException if the updates cannot be committed due to | ||
| /// conflicts. | ||
| virtual void CommitTransaction() = 0; | ||
wgtmac marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /// This method applies all pending data operations and metadata updates in the | ||
| /// transaction and commits them to the table in a single atomic operation. | ||
| /// | ||
| /// \return Status::OK if the transaction was committed successfully, or an error | ||
| /// status if validation failed or the commit encountered conflicts | ||
| virtual Status CommitTransaction() = 0; | ||
| }; | ||
|
|
||
| } // namespace iceberg | ||
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.
If we don't need to move
lock, we can usestd::lock_guard<>instead. Can you help to modify the other cases in this file? Or we can open a new PR to do this.