REST: Reuse table metadata as part of LoadTable in serializable table #14944
+236
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the change
This change attempts to avoid object store call to recreate the TableMetadata from the object store in case we are making a serialized table copy of the table, this could be seen as an optimization where rather than going to the obj store we keep the serialized copy of the table metadata and then just store it and send it via wire for example (spark driver sending to executor) or can also be looked as a feature where if the catalog has redacted some sensitive info, all the serializable table respects it and reads that rather than going to the object store (which it may not have access to) for example:
Presently its gauraded only for RESTTable and for the case when the location is null
I understand that spec wording the following:
Per REST spec the metadata location is nullable in certain cases
iceberg/open-api/rest-catalog-open-api.yaml
Lines 3396 to 3399 in 4632f31
The spec says the following but that is SHOULD and not MUST :
iceberg/open-api/rest-catalog-open-api.yaml
Line 3365 in 4632f31
just wanted to float this to folks on what they think of this feature.