rahil-c commented on code in PR #9695: URL: https://github.com/apache/iceberg/pull/9695#discussion_r1538559396
########## open-api/rest-catalog-open-api.yaml: ########## @@ -537,6 +537,113 @@ paths: 5XX: $ref: '#/components/responses/ServerErrorResponse' + /v1/{prefix}/namespaces/{namespace}/tables/{table}/preplan: + parameters: + - $ref: '#/components/parameters/prefix' + - $ref: '#/components/parameters/namespace' + - $ref: '#/components/parameters/table' + post: + tags: + - Catalog API + summary: Prepare a list of plan tasks that can be used later for table scan planning + description: + Prepare a list of plan tasks that can be used later for table scan planning. + + Each plan task in the response of this API can be used as the `plan-task` in the `PlanTable` + API request to perform scan planning against a subset of the table files. + + This can be used to parallelize and distribute table scan planning. + operationId: PreplanTable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PreplanTableRequest' + responses: + 200: + $ref: '#/components/responses/PreplanTableResponse' + 400: + $ref: '#/components/responses/BadRequestErrorResponse' + 401: + $ref: '#/components/responses/UnauthorizedResponse' + 403: + $ref: '#/components/responses/ForbiddenResponse' + 404: + description: + Not Found + - NoSuchTableException, the table does not exist + - NoSuchNamespaceException, the namespace does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorModel' + examples: + TableDoesNotExist: + $ref: '#/components/examples/NoSuchTableError' + NamespaceDoesNotExist: + $ref: '#/components/examples/NoSuchNamespaceError' + 419: + $ref: '#/components/responses/AuthenticationTimeoutResponse' + 503: + $ref: '#/components/responses/ServiceUnavailableResponse' + 5XX: + $ref: '#/components/responses/ServerErrorResponse' + + /v1/{prefix}/namespaces/{namespace}/tables/{table}/plan: + parameters: + - $ref: '#/components/parameters/prefix' + - $ref: '#/components/parameters/namespace' + - $ref: '#/components/parameters/table' + post: + tags: + - Catalog API + summary: Perform scan planning against a table + operationId: PlanTable + description: + Perform scan planning against a table based on the user's scan requirements including selected columns and filters. + + Users can provide an optional `plan-task` from the response of `PreplanTable` API to + limit the request of the full task set to a subset of table files. + If a valid `plan-task` is provided, the service must attempt to send all results for that planning task. + + If a user receives a 413 `PayloadTooLargeWithPlanResponse` or 422 `UnprocessableEntityResponse`, + the user should use /preplan before using /plan. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PlanTableRequest' + responses: + 200: + $ref: '#/components/responses/PlanTableResponse' + 400: + $ref: '#/components/responses/BadRequestErrorResponse' + 401: + $ref: '#/components/responses/UnauthorizedResponse' + 403: + $ref: '#/components/responses/ForbiddenResponse' + 404: + description: + Not Found - NoSuchTableException, table to load does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/IcebergErrorResponse' + examples: + TableToLoadDoesNotExist: + $ref: '#/components/examples/NoSuchTableError' + + 413: + $ref: '#/components/responses/PayloadTooLargeWithPlanResponse' Review Comment: will fix this -- 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