Skip to content

Commit d481ed7

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

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

test/in_memory_catalog_test.cc

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,12 @@ TEST_F(InMemoryCatalogTest, RefreshTable) {
124124
auto buildTable = [this, &tableIdent, &mock_catalog, &table_location](
125125
int64_t snapshot_id, int64_t version) -> std::unique_ptr<Table> {
126126
std::unique_ptr<TableMetadata> metadata;
127-
128127
ReadTableMetadata("TableMetadataV2Valid.json", &metadata);
129128
metadata->current_snapshot_id = snapshot_id;
130-
131-
auto metadata_location = std::format("{}v{}.metadata.json", table_location, version);
132-
auto status = TableMetadataUtil::Write(*file_io_, metadata_location, *metadata);
133-
EXPECT_THAT(status, IsOk());
134-
135-
return std::make_unique<Table>(tableIdent, std::move(metadata), metadata_location,
136-
file_io_,
137-
std::static_pointer_cast<Catalog>(mock_catalog));
129+
return std::make_unique<Table>(
130+
tableIdent, std::move(metadata),
131+
std::format("{}v{}.metadata.json", table_location, version), file_io_,
132+
std::static_pointer_cast<Catalog>(mock_catalog));
138133
};
139134

140135
auto table_v0 = buildTable(3051729675574597004, 0);

0 commit comments

Comments
 (0)