Skip to content

Commit 345355a

Browse files
author
shuxu.li
committed
feat: static table metadata access support
1 parent 401a019 commit 345355a

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

test/metadata_io_test.cc

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,25 @@ class MetadataIOTest : public TempFileTestBase {
5050
/*optional=*/false);
5151
auto schema = std::make_shared<Schema>(std::move(schema_fields), /*schema_id=*/1);
5252

53-
TableMetadata metadata{
54-
.format_version = 1,
55-
.table_uuid = "1234567890",
56-
.location = "s3://bucket/path",
57-
.last_sequence_number = 0,
58-
.schemas = {schema},
59-
.current_schema_id = 1,
60-
.default_spec_id = 0,
61-
.last_partition_id = 0,
62-
.properties = {{"key", "value"}},
63-
.current_snapshot_id = 3051729675574597004,
64-
.snapshots = {std::make_shared<Snapshot>(Snapshot{
65-
.snapshot_id = 3051729675574597004,
66-
.sequence_number = 0,
67-
.timestamp_ms = TimePointMsFromUnixMs(1515100955770).value(),
68-
.manifest_list = "s3://a/b/1.avro",
69-
.summary = {{"operation", "append"}},
70-
})},
71-
.default_sort_order_id = 0,
72-
.next_row_id = 0};
73-
return metadata;
53+
return TableMetadata{.format_version = 1,
54+
.table_uuid = "1234567890",
55+
.location = "s3://bucket/path",
56+
.last_sequence_number = 0,
57+
.schemas = {schema},
58+
.current_schema_id = 1,
59+
.default_spec_id = 0,
60+
.last_partition_id = 0,
61+
.properties = {{"key", "value"}},
62+
.current_snapshot_id = 3051729675574597004,
63+
.snapshots = {std::make_shared<Snapshot>(Snapshot{
64+
.snapshot_id = 3051729675574597004,
65+
.sequence_number = 0,
66+
.timestamp_ms = TimePointMsFromUnixMs(1515100955770).value(),
67+
.manifest_list = "s3://a/b/1.avro",
68+
.summary = {{"operation", "append"}},
69+
})},
70+
.default_sort_order_id = 0,
71+
.next_row_id = 0};
7472
}
7573

7674
std::shared_ptr<iceberg::FileIO> io_;

0 commit comments

Comments
 (0)