[Bug report] Lance Spark 0.5.1 reports Namespace not found instead of NoSuchSchemaException
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 935
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 298
Description
### Version
main branch
### Describe what's wrong
`LanceSparkRESTServiceIT.testCreateTableInNonExistentSchemaFails` passes on lance-spark-bundle 0.2.0 and 0.4.0, and fails on 0.5.1.
Creating a table in a missing schema still fails, but 0.5.1 surfaces `Namespace not found: Schema ... does not exist` instead of a message that contains `NoSuchSchemaException`. The test requires all of `NoSuchSchemaException`, the schema name, and `does not exist`.
### Error message and/or stacktrace
```text
LanceSparkRESTServiceIT > testCreateTableInNonExistentSchemaFails() FAILED
org.opentest4j.AssertionFailedError: Expected error message to contain "NoSuchSchemaException",
but message was: Namespace not found: Schema LanceRESTService_metalake_....spark_missing_ns_... does not exist
at org.apache.gravitino.lance.integration.test.LanceSparkRESTServiceIT.testCreateTableInNonExistentSchemaFails(LanceSparkRESTServiceIT.java:302)
```
Gradle task: `:lance:lance-rest-server:testLanceSparkBundle_0_5_1`
### How to reproduce
1. Use current `main`.
2. Run:
```bash
./gradlew :lance:lance-rest-server:lanceSparkMatrixTest \
-PlanceSparkBundleVersions=0.5.1 \
-PskipDockerTests=true \
-PskipWeb=true
```
Or run the Lance compatibility matrix workflow (default versions include `0.2.0,0.4.0,0.5.1`).
Example run: https://github.com/danhuawang/gravitino/actions/runs/34376085905/job/102549165090
### Additional context
The failure is an error-message / client-bundle compatibility issue, not a CI workflow problem. The test can accept both `NoSuchSchemaException` and `Namespace not found`, or the 0.5.1 path can preserve the original exception type in the Spark error text.
Contributor guide
Research direction
Start with LanceSparkRESTServiceIT.testCreateTableInNonExistentSchemaFails and run :lance:lance-rest-server:lanceSparkMatrixTest with lanceSparkBundleVersions=0.5.1, skipDockerTests=true, and skipWeb=true. Compare the 0.2.0, 0.4.0, and 0.5.1 results; done means the failure still includes the schema name and does not exist while handling the expected exception wording consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spark
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100