pvary commented on code in PR #16963:
URL: https://github.com/apache/iceberg/pull/16963#discussion_r4511116338
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -1299,6 +1311,332 @@ paths:
5XX:
$ref: '#/components/responses/ServerErrorResponse'
+ /v1/{prefix}/namespaces/{namespace}/indexes:
+ parameters:
+ - $ref: '#/components/parameters/prefix'
+ - $ref: '#/components/parameters/namespace'
+
+ get:
+ tags:
+ - Index Catalog API
+ summary: List all indexes in a namespace, optionally filtered by type
+ operationId: listIndexes
+ description:
+ Return a list of index summaries for the specified namespace. The list
can be
+ filtered by index type(s) using the `types` query parameter. This
enables
+ query optimizers to discover the indexes available in a given
namespace.
+ parameters:
+ - name: types
+ in: query
+ description:
+ Optional comma-separated list of index types to filter by. If not
+ provided, all indexes are returned.
+ required: false
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/IndexType'
+ style: form
+ explode: false
+ example: "scalar"
+ - $ref: '#/components/parameters/page-token'
+ - $ref: '#/components/parameters/page-size'
+ responses:
+ 200:
+ $ref: '#/components/responses/ListIndexesResponse'
+ 400:
+ $ref: '#/components/responses/BadRequestErrorResponse'
+ 401:
+ $ref: '#/components/responses/UnauthorizedResponse'
+ 403:
+ $ref: '#/components/responses/ForbiddenResponse'
+ 404:
+ description: Not Found - The namespace does not exist
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IcebergErrorResponse'
+ examples:
+ NoSuchNamespaceError:
+ $ref: '#/components/examples/NoSuchNamespaceError'
+ 419:
+ $ref: '#/components/responses/AuthenticationTimeoutResponse'
+ 503:
+ $ref: '#/components/responses/ServiceUnavailableResponse'
+ 5XX:
+ $ref: '#/components/responses/ServerErrorResponse'
+
+ post:
+ tags:
+ - Index Catalog API
+ summary: Create an index on a table
+ operationId: createIndex
+ description:
+ Create a new index on the specified table. The index type, column IDs,
and
+ other configuration must be provided in the request body.
+ parameters:
+ - $ref: '#/components/parameters/idempotency-key'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateIndexRequest'
+ responses:
+ 200:
+ $ref: '#/components/responses/LoadIndexResponse'
Review Comment:
The index is an optional structure and don't cause inconsistency if created
without an `extract`. So I suggest to don't complicate things with
`stage-create` in the first phase.
--
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]