Repository navigation
v0.3.0
Note: 0.3.0 was published to crates.io but not to PyPI; its PyPI publish stopped at a flaky test before uploading. Python users should install 0.3.1, which includes everything below plus two fixes.
lance-csr 0.3.0 makes the engine a Rust library, broadens the supported Cypher considerably, and speeds up the GDC Interactive complex reads.
Highlights
- Use it from Rust. The engine is now on crates.io as
lance-csr.lance_csr::CypherEngineis the same CSR-backed engine as the Python class, with an async API,refresh(), statistics and cooperative query deadlines. See Using from Rust. - Much more Cypher:
UNION/UNION ALL, read-onlyCALL { ... }subqueries, and named path values withrelationships(),startNode()andendNode().keys(),labels(),reduce, and theany/all/none/singlepredicates.- Numeric functions (
abs,round,floor,ceil,sqrt) and string and list functions (left,right,substring,replace,split,trim,reverse,last,tail,size,rangewith a step). - List and map parameters, parameters in
SKIP/LIMIT, and integer lists that keep their precision.
- Query timeouts.
execute,execute_batchesandCypherQuery.executetake a keyword-onlytimeout=in seconds. Rust callers uselance_csr::query::with_execution_deadline. - Faster traversal. The CSR expands high-degree nodes in bounded chunks, traverses variable-length paths iteratively (including zero-hop paths), reuses filter columns, and searches shortest paths from both ends. Repeated queries reuse per-snapshot plan templates.
- Type stubs. The package ships
.pyistubs and apy.typedmarker. target_partitionsonCypherEngine(1 to 1024) sets DataFusion's query partitioning.
Performance
Compared with 0.2.0 on the same machine (release builds, both benchmark suites, all result checks passing):
- GDC Interactive complex reads (IC1–IC14): about 22–25% faster overall. IC12 is about 7× faster and IC13 about 4×.
- 30-query workload: level overall, but Q30 is about 10–14% slower. IC6 is also about 14% slower in memory. Both are tracked in #56.
- Engine construction, warm queries and refresh: unchanged.
The published benchmark tables will be refreshed with 0.3.0 in the benchmark repositories.
Behaviour changes
- The Rust crates are renamed to
lance-csrandlance-csr-catalog(use lance_csr::...). The Python package name and import are unchanged. - Concurrent
refresh()calls run one at a time, so an older snapshot can no longer replace a newer one (#12). - Mixing
UNIONandUNION ALLin one query raisesValueError, as openCypher requires. - Type errors in comparisons and arithmetic name the expression and operand types. String-number comparisons such as
p.age = '30'still run, as before. - Named path records use the metadata fields
__lance_csr_properties,__lance_csr_identity,__lance_csr_startand__lance_csr_end.
Known issues
#56 (two slower queries), #58, #59, #60 and #61 (Cypher behaviours that differ from openCypher, with reproductions).
Thanks
Thanks to David Hughes (@stugorf) for the Cypher, CSR and execution work in this release.
Full changelog: v0.2.0...v0.3.0