-
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
Conversation
src/iceberg/transaction.h
Outdated
| /// \return Status::OK if all updates were queued successfully | ||
| virtual Status UpdateTable( | ||
| const std::vector<std::unique_ptr<TableRequirement>>& requirements, | ||
| std::vector<std::unique_ptr<TableUpdate>> updates) = 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.
| std::vector<std::unique_ptr<TableUpdate>> updates) = 0; | |
| const std::vector<std::unique_ptr<TableUpdate>>& updates) = 0; |
src/iceberg/transaction.h
Outdated
| /// \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( |
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.
Why do we need this? I don't think Transaction is the entrance to create a single update action and Catalog is responsible of this. Let's remove it.
| #pragma once | ||
|
|
||
| #include <memory> | ||
| #include <vector> |
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.
Why include this?
|
|
||
| Status InMemoryCatalog::RenameTable(const TableIdentifier& from, | ||
| const TableIdentifier& to) { | ||
| std::unique_lock lock(mutex_); |
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 use std::lock_guard<> instead. Can you help to modify the other cases in this file? Or we can open a new PR to do this.
|
Thanks @lishuxu for working on this and @shangxinli @HuaHuaY @HeartLinked for the review. Let's improve it in followup PRs and move forward! |
No description provided.