This is an automated email from the ASF dual-hosted git repository.

FANNG1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new 7e3ee58f21 [#13029] fix(lance): Correct the Lance Spark Catalog class 
in the integration guide (#13030)
7e3ee58f21 is described below

commit 7e3ee58f2129aa231e09896ae56767d23cf25a64
Author: StormSpirit <[email protected]>
AuthorDate: Thu Sep 10 09:53:10 2026 +0800

    [#13029] fix(lance): Correct the Lance Spark Catalog class in the 
integration guide (#13030)
    
    ### What changes were proposed in this pull request?
    
    Update the Lance Spark integration guide to use
    `org.lance.spark.LanceNamespaceSparkCatalog`, which is the Catalog
    implementation shipped by the supported
    `lance-spark-bundle-3.5_2.12:0.4.0` bundle.
    
    Add `checkLanceSparkCatalogDocumentation` to the Lance REST server
    Gradle build. The check extracts the Catalog class from the
    documentation example, verifies that exactly one class is documented,
    and checks that the corresponding `.class` entry exists in every
    prepared Lance Spark bundle. The check is attached to the normal `test`
    task and the existing `lanceSparkMatrixTest` task.
    
    ### Why are the changes needed?
    
    The integration guide referenced
    `com.lancedb.lance.spark.LanceNamespaceSparkCatalog`, which is absent
    from the supported 0.4.0 bundle. Following the guide fails with
    `ClassNotFoundException` while Spark loads the Catalog, before Spark
    contacts the Gravitino Lance REST endpoint. The existing
    `LanceSparkRESTServiceIT` already uses the correct `org.lance` class, so
    this change aligns the documentation with the runtime test configuration
    and adds a guard against future documentation-to-bundle drift.
    
    Fix: #13029
    
    ### Does this PR introduce _any_ user-facing change?
    
    Yes. Users following the Lance Spark integration guide can load the
    documented Catalog with the supported 0.4.0 bundle. No public API, REST
    protocol, storage configuration, Docker default, or vector computation
    behavior is changed.
    
    ### How was this patch tested?
    
    - `./gradlew
    :lance:lance-rest-server:checkLanceSparkCatalogDocumentation
    -PskipWeb=true -PskipDockerTests=true --no-daemon --console=plain`:
    passed for the default 0.4.0 bundle.
    - `./gradlew
    :lance:lance-rest-server:checkLanceSparkCatalogDocumentation
    -PlanceSparkBundleVersions=0.2.0,0.4.0 -PskipWeb=true
    -PskipDockerTests=true --no-daemon --console=plain`: passed for both
    configured bundles.
    - `./gradlew :lance:lance-rest-server:test -PskipITs
    -PskipDockerTests=true -PskipWeb=true --no-daemon --console=plain`:
    passed; the normal test task executed the documentation check.
    - `./gradlew :lance:lance-rest-server:spotlessKotlinGradleCheck
    -PskipWeb=true -PskipDockerTests=true --no-daemon --console=plain`:
    passed.
    - `./gradlew :lance:lance-rest-server:lanceSparkMatrixTest
    -PlanceSparkBundleVersions=0.2.0,0.4.0 -PskipDockerTests=true
    -PskipWeb=true --no-daemon --console=plain`: passed; both per-version
    `LanceSparkRESTServiceIT` tasks passed.
    
    The known 0.5.1 error-path assertion failure was not changed and did not
    gate this documentation-focused PR.
    
    ---------
    
    Signed-off-by: jiangxt2 <[email protected]>
---
 docs/lance-rest-integration.md           | 2 +-
 lance/lance-rest-server/build.gradle.kts | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/lance-rest-integration.md b/docs/lance-rest-integration.md
index 1ae023fa23..6942b01df4 100644
--- a/docs/lance-rest-integration.md
+++ b/docs/lance-rest-integration.md
@@ -138,7 +138,7 @@ os.environ["PYSPARK_SUBMIT_ARGS"] = (
 # it via Lance REST API `CreateNamespace` or Gravitino REST API 
`CreateCatalog`.
 spark = SparkSession.builder \
     .appName("lance_rest_integration") \
-    .config("spark.sql.catalog.lance", 
"com.lancedb.lance.spark.LanceNamespaceSparkCatalog") \
+    .config("spark.sql.catalog.lance", 
"org.lance.spark.LanceNamespaceSparkCatalog") \
     .config("spark.sql.catalog.lance.impl", "rest") \
     .config("spark.sql.catalog.lance.uri", "http://localhost:9101/lance";) \
     .config("spark.sql.catalog.lance.parent", "lance_catalog") \
diff --git a/lance/lance-rest-server/build.gradle.kts 
b/lance/lance-rest-server/build.gradle.kts
index 176c4f16b7..7899bad829 100644
--- a/lance/lance-rest-server/build.gradle.kts
+++ b/lance/lance-rest-server/build.gradle.kts
@@ -157,6 +157,7 @@ tasks {
       into(lanceSparkBundleDirFor(version))
     }
   }
+
   val primaryPrepareLanceSparkBundle =
     named(lanceSparkPrepareTaskName(primaryLanceSparkBundleVersion))
 

Reply via email to