Skip to content

[Bug report] Fix the issues of the planning interface #10841

@roryqi

Description

@roryqi

docker run --rm -d --name grav-plain -p 29001:9001 apache/gravitino:1.2.0
sleep 15

Defect 1: /plan is advertised with a malformed URL template.
Gravitino advertises: POST /v1/{prefix}/tables/{table}/plan
Iceberg REST OpenAPI spec (apache/iceberg main, operationId planTableScan) defines:
POST /v1/{prefix}/namespaces/{namespace}/tables/{table}/plan
The /namespaces/{namespace} segment is missing from Gravitino's advertisement.
curl -s http://localhost:29001/iceberg/v1/config | python3 -m json.tool | grep plan

Create namespace and table so the next probe isn't a table-lookup failure
curl -sS -X POST -H "Content-Type: application/json"
-d '{"namespace": ["t"]}'
http://localhost:29001/iceberg/v1/namespaces

curl -sS -X POST -H "Content-Type: application/json"
-d '{"name": "tbl", "schema": {"type": "struct", "schema-id": 0, "fields": [{"id": 1, "name": "id", "type": "long", "required": false}]}}'
http://localhost:29001/iceberg/v1/namespaces/t/tables

Defect 2: /plan is not wired as a Jersey route at either path.
Both probes below return 500-wrapped javax.ws.rs.NotFoundException
from org.glassfish.jersey.server.ServerRuntime — no route registered,
not an Iceberg-handler table-lookup miss.
curl -i -sS -X POST -H "Content-Type: application/json" -d '{"select": ["*"]}'
http://localhost:29001/iceberg/v1/tables/tbl/plan

curl -i -sS -X POST -H "Content-Type: application/json" -d '{"select": ["*"]}'
http://localhost:29001/iceberg/v1/namespaces/t/tables/tbl/plan

Metadata

Metadata

Assignees

Labels

1.2.1Release v1.2.11.3.0Release v1.3.0bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions