FANNG1 commented on PR #10637: URL: https://github.com/apache/gravitino/pull/10637#issuecomment-4327484475
In [`LanceNamespaceOperations`](https://github.com/apache/gravitino/blob/d8628d949/lance/lance-rest-server/src/main/java/org/apache/gravitino/lance/service/rest/LanceNamespaceOperations.java#L108-L115) this PR adds a new root route, `POST /v1/namespace/describe`, which forwards `ROOT_NAMESPACE_ID = ""` to `describeNamespaceInternal(...)`. However, the real backend still rejects empty namespace ids in [`GravitinoLanceNameSpaceOperations.describeNamespace`](https://github.com/apache/gravitino/blob/d8628d949/lance/lance-common/src/main/java/org/apache/gravitino/lance/common/ops/gravitino/GravitinoLanceNameSpaceOperations.java#L129-L155), because it requires `nsId.levels() > 0`. So the new route cannot succeed against the actual backend. The mock-based Jersey test passes only because `namespaceOps.describeNamespace(any(), any())` is stubbed to return success for all inputs, including `""`: [`TestLanceNamespaceOperations`](https://github.com/apache/gravitino/blob/d8628d949/lance/lance-rest-server/src/test/java/org/apache/gravitino/lance/service/rest/TestLanceNamespaceOperations.java#L219-L246) This also matches the integration test, which still expects empty-id describe to fail: [`LanceRESTServiceIT`](https://github.com/apache/gravitino/blob/d8628d949/lance/lance-rest-server/src/test/java/org/apache/gravitino/lance/integration/test/LanceRESTServiceIT.java#L183-L190) -- 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]
