danielcweeks commented on code in PR #17642:
URL: https://github.com/apache/iceberg/pull/17642#discussion_r4688487685
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -4270,13 +4354,37 @@ components:
items:
$ref: '#/components/schemas/FieldLabels'
+ TableLocation:
+ type: string
+ description:
+ The table's base location, used to resolve relative paths in metadata.
+ Must be an absolute location with a URI scheme.
+
LoadTableResult:
description: |
Result used when a table is successfully loaded.
- The table metadata JSON is returned in the `metadata` field. The
corresponding file location of table metadata should be returned in the
`metadata-location` field, unless the metadata is not yet committed. For
example, a create transaction may return metadata that is staged but not
committed.
- Clients can check whether metadata has changed by comparing metadata
locations after the table has been created.
+ The table metadata JSON is returned in the `metadata` field.
+ The location of the table metadata file is returned in the
`metadata-location` field when the table has one, and the table's base location
in the `table-location` field.
+
+
+ ## Metadata location
+
+
+ The `metadata-location` field is optional.
+ It is absent when the metadata is staged but not committed, as in a
create transaction, and when the table has no client-visible metadata location.
Review Comment:
```suggestion
It is absent when the metadata is staged but not committed, as in a
create transaction, and when the catalog manages the metadata without a
physical metadata file.
```
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -5358,11 +5472,16 @@ components:
CommitTableResponse:
type: object
required:
- - metadata-location
- metadata
properties:
metadata-location:
type: string
+ description: Location of the committed table metadata file.
Review Comment:
Since we're making this optional, it feels like we're erasing the prior
requirement for v3 and earlier tables. We should note in the description that
it's required on v3 and earlier tables.
<!-- lenses: weeks-review, russell-review -->
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -4270,13 +4354,37 @@ components:
items:
$ref: '#/components/schemas/FieldLabels'
+ TableLocation:
+ type: string
+ description:
+ The table's base location, used to resolve relative paths in metadata.
+ Must be an absolute location with a URI scheme.
+
LoadTableResult:
description: |
Result used when a table is successfully loaded.
- The table metadata JSON is returned in the `metadata` field. The
corresponding file location of table metadata should be returned in the
`metadata-location` field, unless the metadata is not yet committed. For
example, a create transaction may return metadata that is staged but not
committed.
- Clients can check whether metadata has changed by comparing metadata
locations after the table has been created.
+ The table metadata JSON is returned in the `metadata` field.
+ The location of the table metadata file is returned in the
`metadata-location` field when the table has one, and the table's base location
in the `table-location` field.
+
+
+ ## Metadata location
+
+
+ The `metadata-location` field is optional.
+ It is absent when the metadata is staged but not committed, as in a
create transaction, and when the table has no client-visible metadata location.
+
+
+ When present, clients can check whether metadata has changed by
comparing metadata locations.
+
+
+ ## Table location
+
+
+ The `table-location` field carries the table's base location.
+ Format version 4 allows location fields in metadata to be relative and
makes `metadata.location` optional.
+ Exactly one of `metadata.location` and `table-location` must be
present.
Review Comment:
```suggestion
Exactly one of `metadata.location` or `table-location` must be
present.
```
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -4270,13 +4354,37 @@ components:
items:
$ref: '#/components/schemas/FieldLabels'
+ TableLocation:
+ type: string
+ description:
+ The table's base location, used to resolve relative paths in metadata.
+ Must be an absolute location with a URI scheme.
+
LoadTableResult:
description: |
Result used when a table is successfully loaded.
- The table metadata JSON is returned in the `metadata` field. The
corresponding file location of table metadata should be returned in the
`metadata-location` field, unless the metadata is not yet committed. For
example, a create transaction may return metadata that is staged but not
committed.
- Clients can check whether metadata has changed by comparing metadata
locations after the table has been created.
+ The table metadata JSON is returned in the `metadata` field.
+ The location of the table metadata file is returned in the
`metadata-location` field when the table has one, and the table's base location
in the `table-location` field.
+
+
+ ## Metadata location
+
+
+ The `metadata-location` field is optional.
+ It is absent when the metadata is staged but not committed, as in a
create transaction, and when the table has no client-visible metadata location.
+
+
+ When present, clients can check whether metadata has changed by
comparing metadata locations.
+
+
+ ## Table location
+
+
+ The `table-location` field carries the table's base location.
+ Format version 4 allows location fields in metadata to be relative and
makes `metadata.location` optional.
+ Exactly one of `metadata.location` and `table-location` must be
present.
Review Comment:
I'd like other's opinion's on this @RussellSpitzer, @rdblue,
@amogh-jahagirdar, do we think it's reasonable to levy this requirement or are
we just going to end up with a conflict and should define precedence rules?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]