Skip to content

refactor(config)!: remove deprecated with_node_label and with_relationship - #88

Merged
prrao87 merged 2 commits into
mainfrom
chore/remove-deprecated-builder-methods
Oct 30, 2026
Merged

prrao87 merged 2 commits into
mainfrom
chore/remove-deprecated-builder-methods

Conversation

@prrao87

@prrao87 prrao87 commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Why

with_node_label and with_relationship have been deprecated since 0.2.0 in favour of node_table and rel_table. This PR removes them ahead of the 0.5.0 release. It also adds a short Rust example to the getting started page so readers learn early that a Rust crate exists.

What changed

  • Breaking: removed GraphConfigBuilder.with_node_label and GraphConfigBuilder.with_relationship from the Python API, and with_node_label, with_relationship and with_relationship_endpoints from the Rust GraphConfigBuilder. with_relationship_endpoints only existed to finish what with_relationship started.

  • Migration is one to one:

    Removed Replacement
    with_node_label(label, id_field) node_table(label, primary_key)
    with_relationship(rel_type, source_field, target_field, source_label, target_label) rel_table(rel_type, from_table, to_table, src, dst)
  • Python can no longer configure a relationship without endpoint labels, so the Python tests that only covered that case were removed. In Rust, with_relationship_mapping still allows it, and the alternation unit test that checks the "needs endpoint labels" error now builds its mapping that way.

  • Docs: the graph schema page lists the methods as removed in 0.5.0, with their replacements, and the getting started note and Python README match. The getting started CSR example has a new Rust tab. It includes the compiled embedded_query example, so CI keeps it building, and links to the Rust page for more.

Validation

  • cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace: pass.

  • make install, make lint (ruff, format, pyright) and make test (1612 passed): pass.

  • zensical build --strict, check_snippets.py and typos: pass. I confirmed the Rust tab renders with the included snippet.

  • Benchmarks, following the harness in CONTRIBUTING.md: release wheels built from main (1dc63aa) and this branch (eb43f52), loaded with uv run --with, both suites, memory and lazy modes, alternating main and branch with two runs each. Every query's answer passed on both wheels (176 of 176 tests). Apple Silicon Mac on AC power; this app was also running, so the machine wasn't fully idle.

    Suite Mode Geomean branch/main Geomean main/main (noise)
    30 queries (graph-benchmark-ldbc) memory 1.020 1.017
    30 queries (graph-benchmark-ldbc) lazy 1.050 1.044
    IC1 to IC14 (graph-benchmark-ldbc-complex) memory 0.939 0.922
    IC1 to IC14 (graph-benchmark-ldbc-complex) lazy 1.006 1.006

    Every suite and mode is within the main-vs-main noise, as expected for a change that only deletes builder methods the runners don't call. Five queries moved by more than 15%. Lazy queries 18, 21 and 28 (+17% to +34%) came from one noisy branch run, with its standard deviation up from about 0.03 ms to 0.85 to 1.83 ms. The other branch run matched main, and an extra main/branch pair put all three within 6%. That extra pair's branch run was slower across the board (geomean 1.16, a different set of queries), while the CPU was busy with other work. IC4 and IC8 in memory (-18% and -15%) are inside the main-vs-main spread for that mode (up to 21%).

  • The 30-query runner needed a patch to run on this branch: its shared build_config() calls the removed methods. The lance-csr runner now builds the same mapping with node_table and rel_table, reading each relationship's endpoint tables from its dataset name, and all 30 answers still pass on 0.3.1 and on both wheels. That change is in hyperdimensionalcomputingai/graph-benchmark-ldbc#33. Both wheels ran the patched runner, so they measure the same config.

graph-benchmark-ldbc, memory: every query
Query main (ms) branch (ms) change
query1 0.61 0.62 +1.7%
query2 0.52 0.55 +5.6%
query3 0.63 0.64 +0.6%
query4 0.50 0.50 +0.6%
query5 0.76 0.77 +1.2%
query6 0.42 0.43 +3.6%
query7 1.01 1.02 +0.7%
query8 0.62 0.62 +0.8%
query9 0.79 0.81 +1.7%
query10 0.70 0.72 +1.6%
query11 1.49 1.54 +3.9%
query12 0.73 0.77 +4.6%
query13 0.78 0.80 +2.8%
query14 0.52 0.52 +1.3%
query15 0.55 0.55 +1.3%
query16 0.65 0.66 +1.1%
query17 0.89 0.90 +1.1%
query18 0.68 0.69 +1.4%
query19 0.91 0.95 +4.7%
query20 1.99 1.99 -0.1%
query21 0.76 0.75 -0.1%
query22 0.70 0.71 +0.5%
query23 0.72 0.73 +1.4%
query24 0.68 0.69 +1.2%
query25 0.78 0.81 +4.0%
query26 0.72 0.80 +10.6%
query27 0.85 0.86 +1.0%
query28 1.39 1.39 +0.0%
query29 0.68 0.69 +1.3%
query30 41.77 41.89 +0.3%

Geomean branch/main: 1.020
Geomean main run 2/run 1 (noise): 1.017

graph-benchmark-ldbc, lazy: every query
Query main (ms) branch (ms) change
query1 1.16 1.14 -1.5%
query2 1.38 1.39 +1.0%
query3 0.79 0.80 +0.7%
query4 0.78 0.78 -0.5%
query5 2.11 2.11 -0.4%
query6 0.72 0.72 -0.4%
query7 1.11 1.08 -2.2%
query8 1.72 1.75 +1.8%
query9 1.34 1.35 +0.8%
query10 0.96 0.93 -3.6%
query11 2.18 2.02 -7.2%
query12 6.78 6.76 -0.3%
query13 1.15 1.26 +9.7%
query14 0.80 0.75 -5.7%
query15 0.76 0.84 +10.9%
query16 1.08 1.19 +9.7%
query17 1.37 1.46 +6.6%
query18 1.13 1.32 +17.5%
query19 1.35 1.34 -0.5%
query20 16.17 18.40 +13.8%
query21 0.83 1.11 +33.5%
query22 0.92 1.01 +10.8%
query23 1.22 1.27 +4.2%
query24 1.14 1.14 -0.1%
query25 1.24 1.39 +11.8%
query26 1.14 1.16 +1.3%
query27 1.31 1.37 +5.1%
query28 2.34 2.75 +17.4%
query29 1.02 1.15 +13.0%
query30 42.50 48.09 +13.2%

Geomean branch/main: 1.050
Geomean main run 2/run 1 (noise): 1.044

graph-benchmark-ldbc-complex, memory: every query
Query main (ms) branch (ms) change
query1 26.33 29.61 +12.5%
query2 3.11 2.73 -12.4%
query3 71.26 61.29 -14.0%
query4 7.53 6.21 -17.5%
query5 87.54 75.60 -13.6%
query6 25.80 23.00 -10.9%
query7 22.77 20.80 -8.6%
query8 2.63 2.23 -15.2%
query9 42.84 41.30 -3.6%
query10 101.64 108.52 +6.8%
query11 3.81 3.74 -1.7%
query12 20.44 19.96 -2.3%
query13 1.11 1.11 +0.6%
query14 50.63 50.63 +0.0%

Geomean branch/main: 0.939
Geomean main run 2/run 1 (noise): 0.922

graph-benchmark-ldbc-complex, lazy: every query
Query main (ms) branch (ms) change
query1 31.37 31.85 +1.5%
query2 25.14 25.25 +0.4%
query3 388.73 395.57 +1.8%
query4 12.59 12.73 +1.1%
query5 98.54 99.33 +0.8%
query6 22.73 22.72 -0.1%
query7 31.51 31.68 +0.6%
query8 3.23 3.24 +0.3%
query9 778.82 779.59 +0.1%
query10 126.72 127.18 +0.4%
query11 5.72 5.74 +0.4%
query12 24.46 24.56 +0.4%
query13 1.44 1.45 +0.3%
query14 49.97 50.22 +0.5%

Geomean branch/main: 1.006
Geomean main run 2/run 1 (noise): 1.006

🤖 Generated with Claude Code

…nship

Both builder methods have been deprecated since 0.2.0 in favour of
node_table and rel_table. Remove them from the Rust GraphConfigBuilder
(with with_relationship_endpoints, which only completed
with_relationship), the Python bindings and the Python facade, along
with the tests that exercised them. The docs now list them as removed
in 0.5.0, with their replacements.

Relationships without endpoint labels can still be built in Rust with
with_relationship_mapping; the Rust alternation test now does that.
Show the crate next to the Python example, reusing the compiled embedded_query example, and link to the Rust page for more.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Deploying lance-csr with  Cloudflare Pages  Cloudflare Pages

Latest commit: eb43f52
Status: ✅  Deploy successful!
Preview URL: https://6ff48310.lance-csr.pages.dev
Branch Preview URL: https://chore-remove-deprecated-buil.lance-csr.pages.dev

View logs

@prrao87
prrao87 marked this pull request as ready for review October 30, 2026 13:55
@prrao87
prrao87 merged commit 987f990 into main Oct 30, 2026
8 checks passed
@prrao87
prrao87 deleted the chore/remove-deprecated-builder-methods branch October 30, 2026 14:29
prrao87 added a commit that referenced this pull request Oct 30, 2026
* chore: bump version 0.4.0 → 0.5.0

0.5.0 rather than 0.4.1: #87 changed the Rust CSR API and #88 removed
the deprecated with_node_label and with_relationship builder methods.
Also refresh the version in the three lockfiles, which bump-my-version
does not update.

* ci: build and test macOS wheels on macos-15 runners

GitHub retires the macos-14 image on 2026-11-02, and a scheduled brownout
cancelled the 0.5.0 dry run's macOS build. macos-15 runners are also Apple
Silicon, and MACOSX_DEPLOYMENT_TARGET stays 11.0, so the wheel tag is
unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant