bennychow commented on code in PR #11041: URL: https://github.com/apache/iceberg/pull/11041#discussion_r1744837644
########## format/view-spec.md: ########## @@ -81,9 +93,12 @@ Each version in `versions` is a struct with the following fields: | _required_ | `representations` | A list of [representations](#representations) for the view definition | | _optional_ | `default-catalog` | Catalog name to use when a reference in the SELECT does not contain a catalog | | _required_ | `default-namespace` | Namespace to use when a reference in the SELECT is a single identifier | +| _optional_ | `storage-table` | A [full identifier](#full-identifier) of the storage table | When `default-catalog` is `null` or not set, the catalog in which the view is stored must be used as the default catalog. +When 'storage-table' is `null` or not set, the entity is a common view, otherwise it is a materialized view. + Review Comment: We also discussed adding a view property: **materialization.max-staleness-ms** This is a hint to the materialization consumer about the grace period that a possibly stale materialization can still be used. This grace period may start when the refresh is triggered or when a source table or view has changed depending on implementation. Do you think we should still have this property? It gets complicated when you have Iceberg views that reference non-Iceberg tables. ########## format/view-spec.md: ########## @@ -158,6 +173,59 @@ Each entry in `version-log` is a struct with the following fields: | _required_ | `timestamp-ms` | Timestamp when the view's `current-version-id` was updated (ms from epoch) | | _required_ | `version-id` | ID that `current-version-id` was set to | +#### Full identifier + +The full identifier holds a fully resolved reference for a table or view in the catalog. + +| Requirement | Field name | Description | +|-------------|----------------|-------------| +| _required_ | `catalog` | A string specifying the catalog of the source table | +| _required_ | `namespace` | A list of namespace levels | +| _required_ | `table` | A string specifying the name of the source table | +| _optional_ | `ref` | Branch name of the source table that is being referenced in the view query | + +When 'ref' is `null` or not set, it defaults to “main”. This field is to be ignored if the referenced entity is a view. + +### Materialized View Metadata stored as part of the Table Metadata Review Comment: Should we include **refresh-start-timestamp-ms** which is when the refresh is triggered and an approximation of the refresh state? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org