pvary commented on code in PR #16963:
URL: https://github.com/apache/iceberg/pull/16963#discussion_r4511098295
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -1309,296 +1345,283 @@ paths:
5XX:
$ref: '#/components/responses/ServerErrorResponse'
- /v1/{prefix}/namespaces/{namespace}/tables/{table}/unregister:
+ /v1/{prefix}/namespaces/{namespace}/indexes:
parameters:
- $ref: '#/components/parameters/prefix'
- $ref: '#/components/parameters/namespace'
- - $ref: '#/components/parameters/table'
- post:
+ get:
tags:
- - Catalog API
- summary: Unregister a table without removing its data or metadata files
- operationId: unregisterTable
- parameters:
- - $ref: '#/components/parameters/idempotency-key'
+ - Index Catalog API
+ summary: List the indexes of all tables in a namespace
+ operationId: listNamespaceIndexes
description:
- Unregister a table from the catalog. This is the opposite of
- `registerTable`. The table no longer exists in the catalog, but the
- underlying data and metadata files are left in place so that the table
- can be registered in another catalog.
+ Return summaries of the indexes of all tables in the specified
namespace, optionally
+ filtered by index types. Each summary identifies the table that the
index belongs to.
+ Indexes of tables in child namespaces are not returned. Indexes are
not filtered by
+ table snapshot.
- On success, this returns the table's last metadata location and the
- corresponding table metadata. This table metadata must include all
- commits that happened before the unregister operation. All attempted
- commits after the unregister operation in this catalog must fail.
+ This endpoint is for maintenance, such as finding every index in a
namespace without
+ listing the indexes of each table. Servers are not required to support
it; a server
+ that supports it MUST list it in the `endpoints` field of the config
response.
+
+
+ The server MUST return only indexes of tables that the caller can
load, so that the
+ response does not reveal tables the caller cannot see.
+ parameters:
+ - $ref: '#/components/parameters/page-token'
+ - $ref: '#/components/parameters/page-size'
+ - $ref: '#/components/parameters/index-types'
responses:
200:
- $ref: '#/components/responses/UnregisterTableResponse'
+ $ref: '#/components/responses/ListIndexesResponse'
400:
$ref: '#/components/responses/BadRequestErrorResponse'
401:
$ref: '#/components/responses/UnauthorizedResponse'
403:
$ref: '#/components/responses/ForbiddenResponse'
404:
- description:
- Not Found - NoSuchTableException, table to unregister does not
exist
+ description: Not Found - The namespace does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/IcebergErrorResponse'
examples:
- TableToUnregisterDoesNotExist:
- $ref: '#/components/examples/NoSuchTableError'
+ NoSuchNamespaceError:
+ $ref: '#/components/examples/NoSuchNamespaceError'
+ 406:
+ $ref: '#/components/responses/UnsupportedOperationResponse'
419:
$ref: '#/components/responses/AuthenticationTimeoutResponse'
503:
$ref: '#/components/responses/ServiceUnavailableResponse'
5XX:
$ref: '#/components/responses/ServerErrorResponse'
- /v1/{prefix}/namespaces/{namespace}/tables/{table}/credentials:
+ /v1/{prefix}/namespaces/{namespace}/tables/{table}/indexes:
+ description: >
+ Indexes are sub-resources of their table, and access to an index follows
access to the
+ table. Servers SHOULD allow loading and listing the indexes of a table
only to callers that
+ can load the table, and creating, updating, and dropping them only to
callers that can
+ commit to the table. Servers MAY define separate privileges for indexes,
but MUST NOT grant
+ access to an index of a table that the caller cannot load.
parameters:
- $ref: '#/components/parameters/prefix'
- $ref: '#/components/parameters/namespace'
- $ref: '#/components/parameters/table'
get:
tags:
- - Catalog API
- summary: Load vended credentials for a table from the catalog
- operationId: loadCredentials
+ - Index Catalog API
+ summary: List the indexes of a table, optionally filtered by index types
Review Comment:
Very hard to review these changes as GitHub decided that this is a
modification of the credentials api., but I don't see parameters, so I don't
see how we propose to filter by index types
--
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]