-
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 4 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 |
|---|---|---|
|
|
@@ -404,6 +404,13 @@ Result<std::shared_ptr<Transaction>> InMemoryCatalog::StageCreateTable( | |
| return NotImplemented("stage create table"); | ||
| } | ||
|
|
||
| Result<std::shared_ptr<Transaction>> InMemoryCatalog::StageReplaceTable( | ||
| const TableIdentifier& identifier, const Schema& schema, const PartitionSpec& spec, | ||
| const std::string& location, | ||
| const std::unordered_map<std::string, std::string>& properties, bool orCreate) { | ||
| return NotImplemented("stage replace table"); | ||
| } | ||
|
|
||
| Result<bool> InMemoryCatalog::TableExists(const TableIdentifier& identifier) const { | ||
| std::unique_lock lock(mutex_); | ||
| return root_namespace_->TableExists(identifier); | ||
|
|
@@ -415,6 +422,12 @@ Status InMemoryCatalog::DropTable(const TableIdentifier& identifier, bool purge) | |
| return root_namespace_->UnregisterTable(identifier); | ||
| } | ||
|
|
||
| Status InMemoryCatalog::RenameTable(const TableIdentifier& from, | ||
| const TableIdentifier& to) { | ||
| std::unique_lock lock(mutex_); | ||
|
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. If we don't need to move |
||
| return NotImplemented("rename table"); | ||
| } | ||
|
|
||
| Result<std::unique_ptr<Table>> InMemoryCatalog::LoadTable( | ||
| const TableIdentifier& identifier) { | ||
| if (!file_io_) [[unlikely]] { | ||
|
|
||
| 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, | ||||||
| std::vector<std::unique_ptr<TableUpdate>> updates) = 0; | ||||||
|
||||||
| std::vector<std::unique_ptr<TableUpdate>> updates) = 0; | |
| const std::vector<std::unique_ptr<TableUpdate>>& updates) = 0; |
Uh oh!
There was an error while loading. Please reload this page.