Repository navigation
refactor!: fold lance-csr-catalog into lance-csr and pin namespace reads - #124
Merged
Merged
Conversation
Move GraphSourceCatalog, InMemoryCatalog, SimpleTableSource and DirNamespace into lance-csr and stop building and publishing the lance-csr-catalog crate. The root re-exports are unchanged. execute_with_namespace now accepts any LanceNamespace and opens each table at the version and with the storage options describe_table returns. Add a mapping module with GraphMapping, its structural checks, GraphSnapshot for pinned tables, and conversion to GraphConfig, and make open_lance_dataset public. Breaking for Rust: the lance-csr-catalog crate is gone, and the namespace methods take a LanceNamespace trait object.
prrao87
marked this pull request as ready for review
November 4, 2026 15:31
prrao87
added a commit
that referenced
this pull request
Nov 4, 2026
Minor bump: #124 is a breaking change (refactor!). It removes the lance-csr-catalog crate and changes the Rust namespace method signatures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
The
lance-csr-catalogcrate is now retired. We only need to depend onlance-csrinstead.Why
Upcoming work on frontend and ingestion UIs will let applications that store graphs as plain Lance tables share one graph contract from
lance-csr, instead of each keeping its own copy of the mapping types, its own mapping checks and its own code for opening tables at a pinned version. This PR prepareslance-csrfor that, ahead of a 0.8.0 release.Two things stand in the way:
lance-csr-catalogdoesn't really require a crate of its own. It is about 240 lines,lance-csris its only dependent, and publishing two crates in order adds release steps and a recovery procedure for when only the first one publishes.What changed
lance-csr.GraphSourceCatalog,InMemoryCatalog,SimpleTableSourceandDirNamespacemove into thelance_csr::source_catalogandlance_csr::namespacemodules. The root re-exports are unchanged, so Python users and code that importslance_csr::DirNamespacesee no difference.lance-csr-catalogis no longer built, version-bumped or published, and the release guide drops its two-crate recovery steps.CypherQuery::execute_with_namespaceaccepts anyLanceNamespace, such as Lance's ownDirectoryNamespace, and opens each table at the version and with the storage optionsdescribe_tablereturns. With no version it opens the latest, as before, which is always the case forDirNamespace.mappingmodule adds:GraphMapping, the version 1 JSON graph descriptor (label to table, key, display column, and relationship endpoints), withvalidate()for the rules that need no table data: at least one node label, at most 64 labels, labels that are ASCII identifiers unique ignoring case, one graph role per table, and endpoints that name a mapped node label.GraphMapping::graph_config, which builds aGraphConfigfrom the tables' Arrow schemas and checks that key, display and endpoint columns exist, keys are scalar, and endpoint types match the node keys.GraphSnapshot, a list of tables pinned to a path and Lance version plus the mapping. It ignores unknown fields, so it reads a publication manifest that also carries row counts or schemas.open()opens every mapped table at its pinned version and returns whatCypherEngine::newtakes.open_lance_datasetis public, as the one helper for opening a table at a pinned version.Breaking (Rust only)
lance-csr-catalogcrate is gone; depend onlance-csrinstead.execute_with_namespacetakesimpl LanceNamespaceandexecute_with_namespace_arctakesArc<dyn LanceNamespace>. Existing calls with aDirNamespaceorArc<DirNamespace>still compile.The version bump to 0.8.0 follows in its own PR, as
RELEASE.mddescribes. The crates.io page forlance-csr-catalogwill keep its 0.7.1 README until a final version pointing tolance-csris published by hand.Validation
cargo test --workspace: all pass, including new tests for the mapping checks, reading a descriptor and a publication manifest, opening a snapshot at a pinned version, and a namespace that pins version 1 after the table was overwritten.cargo clippy --workspace --all-targets -- -D warningsandcargo fmt --all --check: clean.make install,make test(1706 passed) andmake lint: clean.uv run --project docs --locked zensical build --strictanduvx typos@1.26.0 .: clean.🤖 Generated with Claude Code