Skip to content

Commit a6d98c3

Browse files
feat: Implement create table and update table api for rest catalog. (#97)
* feat: Implement update table/create table api for rest catalog * Add create table test * Add some tests for update table * Add tests for table updates and requirements * Add some comments * Add tests for transaction * Fix format * Fix linters * Stop upgrading to uuid 1.6.0 * Fix comments
1 parent 497a1b5 commit a6d98c3

File tree

12 files changed

+1842
-115
lines changed

12 files changed

+1842
-115
lines changed

crates/catalog/rest/src/catalog.rs

Lines changed: 515 additions & 47 deletions
Large diffs are not rendered by default.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"metadata-location": "s3://warehouse/database/table/metadata.json",
3+
"metadata": {
4+
"format-version": 1,
5+
"table-uuid": "bf289591-dcc0-4234-ad4f-5c3eed811a29",
6+
"location": "s3://warehouse/database/table",
7+
"last-updated-ms": 1657810967051,
8+
"last-column-id": 3,
9+
"schema": {
10+
"type": "struct",
11+
"schema-id": 0,
12+
"identifier-field-ids": [2],
13+
"fields": [
14+
{"id": 1, "name": "foo", "required": false, "type": "string"},
15+
{"id": 2, "name": "bar", "required": true, "type": "int"},
16+
{"id": 3, "name": "baz", "required": false, "type": "boolean"}
17+
]
18+
},
19+
"current-schema-id": 0,
20+
"schemas": [
21+
{
22+
"type": "struct",
23+
"schema-id": 0,
24+
"identifier-field-ids": [2],
25+
"fields": [
26+
{"id": 1, "name": "foo", "required": false, "type": "string"},
27+
{"id": 2, "name": "bar", "required": true, "type": "int"},
28+
{"id": 3, "name": "baz", "required": false, "type": "boolean"}
29+
]
30+
}
31+
],
32+
"partition-spec": [],
33+
"default-spec-id": 0,
34+
"last-partition-id": 999,
35+
"default-sort-order-id": 0,
36+
"sort-orders": [{"order-id": 0, "fields": []}],
37+
"properties": {
38+
"write.delete.parquet.compression-codec": "zstd",
39+
"write.metadata.compression-codec": "gzip",
40+
"write.summary.partition-limit": "100",
41+
"write.parquet.compression-codec": "zstd"
42+
},
43+
"current-snapshot-id": -1,
44+
"refs": {},
45+
"snapshots": [],
46+
"snapshot-log": [],
47+
"metadata-log": []
48+
},
49+
"config": {
50+
"client.factory": "io.tabular.iceberg.catalog.TabularAwsClientFactory",
51+
"region": "us-west-2"
52+
}
53+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"metadata-location": "s3://warehouse/database/table/metadata.json",
3+
"metadata": {
4+
"format-version": 2,
5+
"table-uuid": "bf289591-dcc0-4234-ad4f-5c3eed811a29",
6+
"location": "s3://warehouse/database/table",
7+
"last-sequence-number" : 1,
8+
"last-updated-ms": 1657810967051,
9+
"last-column-id": 3,
10+
"current-schema-id": 0,
11+
"schemas": [
12+
{
13+
"type": "struct",
14+
"schema-id": 0,
15+
"identifier-field-ids": [2],
16+
"fields": [
17+
{"id": 1, "name": "foo", "required": false, "type": "string"},
18+
{"id": 2, "name": "bar", "required": true, "type": "int"},
19+
{"id": 3, "name": "baz", "required": false, "type": "boolean"}
20+
]
21+
}
22+
],
23+
"partition-specs": [],
24+
"default-spec-id": 0,
25+
"last-partition-id": 999,
26+
"default-sort-order-id": 0,
27+
"sort-orders": [{"order-id": 0, "fields": []}],
28+
"properties": {
29+
"write.delete.parquet.compression-codec": "zstd",
30+
"write.metadata.compression-codec": "gzip",
31+
"write.summary.partition-limit": "100",
32+
"write.parquet.compression-codec": "zstd"
33+
},
34+
"current-snapshot-id": -1,
35+
"refs": {},
36+
"snapshots": [],
37+
"snapshot-log": [],
38+
"metadata-log": []
39+
}
40+
}

0 commit comments

Comments
 (0)