Skip to content

Commit 92d3cf0

Browse files
author
shuxu.li
committed
feat: Refresh method support for table
1 parent 36bc372 commit 92d3cf0

File tree

3 files changed

+2
-22
lines changed

3 files changed

+2
-22
lines changed

src/iceberg/catalog/in_memory_catalog.cc

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,6 @@ class ICEBERG_EXPORT InMemoryNamespace {
109109
/// ErrorKind::kNoSuchTable if the table does not exist.
110110
Status UnregisterTable(const TableIdentifier& table_ident);
111111

112-
/// \brief Updates the metadata location of an existing table.
113-
///
114-
/// \param table_ident The fully qualified identifier of the table.
115-
/// \param metadata_location The path to the table's metadata.
116-
/// \return Status::OK if the table metadata location is updated;
117-
/// Error otherwise.
118-
Status UpdateTableMetaLocation(const TableIdentifier& table_ident,
119-
const std::string& metadata_location);
120-
121112
/// \brief Checks if a table exists in the specified namespace.
122113
///
123114
/// \param table_ident The identifier of the table to check.
@@ -306,17 +297,6 @@ Status InMemoryNamespace::UnregisterTable(TableIdentifier const& table_ident) {
306297
return {};
307298
}
308299

309-
Status InMemoryNamespace::UpdateTableMetaLocation(const TableIdentifier& table_ident,
310-
const std::string& metadata_location) {
311-
const auto ns = GetNamespace(this, table_ident.ns);
312-
ICEBERG_RETURN_UNEXPECTED(ns);
313-
if (!ns.value()->table_metadata_locations_.contains(table_ident.name)) {
314-
return NotFound("{} does not exist", table_ident.name);
315-
}
316-
ns.value()->table_metadata_locations_[table_ident.name] = metadata_location;
317-
return {};
318-
}
319-
320300
Result<bool> InMemoryNamespace::TableExists(TableIdentifier const& table_ident) const {
321301
const auto ns = GetNamespace(this, table_ident.ns);
322302
ICEBERG_RETURN_UNEXPECTED(ns);

test/in_memory_catalog_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ TEST_F(InMemoryCatalogTest, RefreshTable) {
151151
ASSERT_TRUE(table.value()->current_snapshot().has_value());
152152
ASSERT_EQ(table.value()->current_snapshot().value()->snapshot_id, 3051729675574597004);
153153

154-
// same version
154+
// refresh table to new snapshot
155155
auto status = table.value()->Refresh();
156156
EXPECT_THAT(status, IsOk());
157157
ASSERT_TRUE(table.value()->current_snapshot().has_value());

test/mock_catalog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
namespace iceberg {
2525

26-
class ICEBERG_EXPORT MockInMemoryCatalog : public InMemoryCatalog {
26+
class MockInMemoryCatalog : public InMemoryCatalog {
2727
public:
2828
MockInMemoryCatalog(std::string const& name, std::shared_ptr<FileIO> const& file_io,
2929
std::string const& warehouse_location,

0 commit comments

Comments
 (0)